admin 管理员组文章数量: 887021
2024年2月20日发(作者:电脑如何关闭进程快捷键)
server_names_hash_bucket_size 128; client_max_body_size 100m;
client_header_buffer_size 256k; large_client_header_buffers 4 256k; server { listen 80; server_name www.******.cn; #charset koi8-r; #access_log logs/ main; root "C:/phpStudy/PHPTutorial/WWW/blog/public/"; location / { index ; try_files $uri $uri/ /?$query_string; autoindex on; } #error_page 404 /; # redirect server error pages to the static page / # error_page 500 502 503 504 /; location = / { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ .php$ { # proxy_pass 127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ .php(.*)$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index ; fastcgi_split_path_info ^((?U).+.php)(/?.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias ; # location / { # root html; # index ; # } #} # HTTPS server # server { listen 443 ssl;
server_name www.******.cn; ssl on; root "C:/phpStudy/PHPTutorial/WWW/blog/public/"; ssl_certificate 1_www.******.cn_; ssl_certificate_key 2_www.******.; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on;
location / {
root "C:/phpStudy/PHPTutorial/WWW/blog/public/"; try_files $uri $uri/ /?$query_string; } location ~ .php(.*)$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index ; fastcgi_split_path_info ^((?U).+.php)(/?.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fastcgi_params; } }include ;}
版权声明:本文标题:配置nginx解决404notfound问题 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.freenas.com.cn/free/1708393723h522485.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论