Skip to content

Instantly share code, notes, and snippets.

@koy1619
Created April 2, 2014 07:36
Show Gist options
  • Save koy1619/9929541 to your computer and use it in GitHub Desktop.
Save koy1619/9929541 to your computer and use it in GitHub Desktop.
nginx-vhost.conf
server {
listen 8080;
server_name test.com;
index index.html index.htm index.php;
root /home/wwwroot/test;
location /test2 {
auth_basic "pd";
auth_basic_user_file /usr/local/nginx/conf/vhost/pd.passwd;
allow 114.112.113.111;
deny all;
}
location /test3/test4 {
if ($request_filename ~ "favicon\.ico$") {
break;
}
if ( -e $request_filename ) {
break;
}
if ( !-e $request_filename ) {
rewrite ^.*$ /mihoyo/hsod2_webview/index.php last;
}
}
location ~ \.php$ {
root /home/wwwroot/operation;
fastcgi_pass unix:/usr/local/php/var/run/php.scoket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME fastcgi_script_name;
include fastcgi.conf;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment