域名配置文件,支持/,niginx server{listen 80; #listen endserver_name 域名; #server_name endindex index.html index.htm index.php; #index endset $subdomain '';root /xxx/xxx/xxx/xxx/gxdc.youzainet.com/web$subdomain;include/xxx/xxx/xxx/
server { listen 80; #listen end server_name 域名; #server_name end index index.html index.htm index.php; #index end set $subdomain ''; root /xxx/xxx/xxx/xxx/gxdc.youzainet.com/web$subdomain; include/xxx/xxx/xxx/xxx/rewrite/amh.conf; #rewrite end #error_page error_page 400 /ErrorPages/400.html; error_page 403 /ErrorPages/403.html; error_page 404 /ErrorPages/404.html; error_page 502 /ErrorPages/502.html; location ~ /ErrorPages/(400|401|403|404|405|502|503)\.html$ { root /xxx/xxx/xxx/xxx//文件夹/web; } location / { #去掉index.php,index 必须在此之上。 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?s=$1 last; break; } } location ~.php { fastcgi_pass unix:/tmp/php-cgi-yzlnmp-域名.sock; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; include fcgi.conf; set $path_info ""; set $real_script_name $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") { set $real_script_name $1; set $path_info $2; } fastcgi_param SCRIPT_FILENAME $document_root$real_script_name; fastcgi_param SCRIPT_NAME $real_script_name; fastcgi_param PATH_INFO $path_info; fastcgi_param DOCUMENT_ROOT /xxx/xxx/xxx/xxx/XXX/web$subdomain; fastcgi_param SCRIPT_FILENAME /xxx/xxx/xxx/xxx/web$subdomain$fastcgi_script_name; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp3|wma)$ { expires 30d; } location ~ .*\.(js|css)$ { expires 12h; } access_log off; #access_log end error_log /dev/null; #error_log end }