网站首页 laravel框架
nigix--服务器配置做个备份
发布时间:2016-12-09 05:41查看次数:3864
server
{
listen 80;
keepalive_timeout 120; # 120 second keep alive
server_name www.fourth.vm ;
rewrite_log on;
# The location of our projects public directory.
root /home/WWW/www.fourth/public ;
# Useful logs for debug.
access_log /home/WWW_Log/www.fourth.access.log ;
error_log /home/WWW_Log/www.fourth.error.log ;
# Point index to the Laravel front controller.
index index.php;
location /images/user/ {
try_files $uri /images/default_head.png ;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# Remove trailing slash to please routing system.
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
# PHP FPM configuration.
location ~* \.php$ {
#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
#include /etc/nginx/fastcgi_params;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# We don't need .ht files with nginx.
location ~ /\.ht {
deny all;
}
# Set header expirations on per-project basis
#location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
location ~* \.(?:ico|css|js|svg|woff)$ {
expires 365d;
}
}
server
{
listen 80;
keepalive_timeout 120; # 120 second keep alive
server_name www.fifth.vm ;
rewrite_log on;
# The location of our projects public directory.
root /home/WWW/www.fifth/public ;
# Useful logs for debug.
access_log /home/WWW_Log/www.fifth.access.log ;
error_log /home/WWW_Log/www.fifth.error.log ;
# Point index to the Laravel front controller.
index index.php;
location /images/user/ {
try_files $uri /images/default_head.png ;
}
location /images/community/logo/ {
try_files $uri /images/community.png ;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# Remove trailing slash to please routing system.
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
# PHP FPM configuration.
location ~* \.php$ {
#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
#include /etc/nginx/fastcgi_params;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# We don't need .ht files with nginx.
location ~ /\.ht {
deny all;
}
# Set header expirations on per-project basis
#location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
# location ~* \.(?:ico|css|js|svg|woff)$ {
# expires 365d;
# }
}
server
{
listen 5080;
keepalive_timeout 120; # 120 second keep alive
server_name www.fifth.vm ;
#rewrite_log on;
# The location of our projects public directory.
root /home/WWW/fifth/storage/app/Video/ ;
# Useful logs for debug.
access_log /home/WWW_Log/www.fifth_video.access.log ;
error_log /home/WWW_Log/www.fifth_video.error.log ;
# Point index to the Laravel front controller.
index index.html;
}
关键字词:javascript##laravel#