猿问

nginx 文件配置 如何设置域名

帮秋
浏览 2384回答 5
5回答

ronaldoBIG_123

官方文档 

bhxhdg

这个百度看看

LIANHK

server { # php     listen 1111;     server_name php_dev_1;  # 这里就是域名     root /home/webserver/discuz/upload;     index index.php;     location / {         if (!-e $request_filename) {             rewrite ^(.*)$ /index.php?s=/$1 last; # rewrite mode             #rewrite ^(.*)$ /index.php/$1 last; # pathinfo mode         }     }     location ~ \.php {         fastcgi_hide_header X-Powered-By;         fastcgi_pass 127.0.0.1:2000;         fastcgi_split_path_info ^(.+\.php)(.*)$;         fastcgi_param PATH_INFO $fastcgi_path_info;         fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;         include fastcgi_params;         fastcgi_connect_timeout 300;         fastcgi_send_timeout 300;         fastcgi_read_timeout 300;     } }
随时随地看视频慕课网APP
我要回答