nginx的vhost.conf配置问题
nginx的vhost.conf配置问题
By 大吉大利
at 2018-06-10
0人收藏 • 3006人看过
这样配置 ,可以安装,但是到了注册哪里,就出现404 not found ,请问是什么问题呢

- 登录后方可回帖
3 个回复 | 最后更新于 2018-06-13
server { listen 80; listen 443 ssl; server_name www.a.com; root /a; index index.php index.html index.htm;
ssl_certificate /a.pem;
ssl_certificate_key /a.key;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
if ($scheme = http ) {
return 301 https://$host$request_uri;
}
location /.git {
deny all;
return 403;
}
location /controller {
deny all;
return 403;
}
location /docker_resources {
deny all;
return 403;
}
location /library {
deny all;
return 403;
}
location /service {
deny all;
return 403;
}
location /view {
deny all;
return 403;
}
location ~ /\.ht {
deny all;
return 403;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /a;
}
location ~ \.php$ {
try_files $uri =404;
root /a;
fastcgi_pass unix:/dev/shm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}回复#1 @大吉大利 :
