默认Nginx配置文件
This commit is contained in:
parent
fe22f540a2
commit
2d65d77d5e
|
@ -0,0 +1,45 @@
|
||||||
|
server {
|
||||||
|
listen [::]:8080 default_server;
|
||||||
|
listen 8080 default_server;
|
||||||
|
server_name _;
|
||||||
|
absolute_redirect off;
|
||||||
|
root /var/www/html;
|
||||||
|
location / {
|
||||||
|
index index.html index.htm index.php;
|
||||||
|
}
|
||||||
|
location ~ \.php$ {
|
||||||
|
fastcgi_pass spage-php74:9000;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
location ~ ^/(\.user.ini|\.htaccess|\.git) {
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
|
||||||
|
expires 12h;
|
||||||
|
error_log off;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
location ~ .*\.(js|css)?$ {
|
||||||
|
expires 12h;
|
||||||
|
error_log off;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
#内网访问
|
||||||
|
listen 80;
|
||||||
|
server_name 10.10.10.10;
|
||||||
|
root /var/www/html;
|
||||||
|
location / {
|
||||||
|
index index.html index.htm index.php;
|
||||||
|
}
|
||||||
|
location ~ \.php$ {
|
||||||
|
fastcgi_pass spage-php74:9000;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue