SHOW:
|
|
- or go back to the newest paste.
| 1 | user nobody; | |
| 2 | worker_processes 4; | |
| 3 | worker_rlimit_nofile 8192; | |
| 4 | events | |
| 5 | {
| |
| 6 | worker_connections 4096; | |
| 7 | } | |
| 8 | ||
| 9 | error_log /opt/nginx/logs/error.log; | |
| 10 | http | |
| 11 | {
| |
| 12 | include mime.types; | |
| 13 | default_type text/plain; | |
| 14 | log_format asdf '$host $remote_addr - $remote_user [$time_local] ' '"$request" $status $bytes_sent ' '"$http_referer" "$http_user_agent" $upstream_response_time'; | |
| 15 | access_log /opt/nginx/logs/access.log asdf; | |
| 16 | sendfile on; | |
| 17 | keepalive_timeout 0; | |
| 18 | error_page 404 =404 /404.html; | |
| 19 | server | |
| 20 | {
| |
| 21 | listen 8080 default; | |
| 22 | - | root /opt/nginx/html/; |
| 22 | + | root /opt/nginx/html; |
| 23 | - | location ~ .php$ {
|
| 23 | + | |
| 24 | - | fastcgi_pass 127.0.0.1:9000; |
| 24 | + | location / {
|
| 25 | - | fastcgi_index index.php; |
| 25 | + | location ~ \.php$ {
|
| 26 | - | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
| 26 | + | fastcgi_pass 127.0.0.1:9000; |
| 27 | - | include /opt/nginx/conf/fastcgi_params; |
| 27 | + | fastcgi_index index.php; |
| 28 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| 29 | include /opt/nginx/conf/fastcgi_params; | |
| 30 | } | |
| 31 | } | |
| 32 | location /status | |
| 33 | {
| |
| 34 | stub_status on; | |
| 35 | allow 127.0.0.1; | |
| 36 | - | location ~ ^/~(.+?)(/.*)?$ |
| 36 | + | |
| 37 | } | |
| 38 | - | alias /home/$1/www$2; |
| 38 | + | location /~ {
|
| 39 | location ~ ^/~([^/]+)/(.+\.php)$ {
| |
| 40 | include /opt/nginx/conf/fastcgi_params; | |
| 41 | fastcgi_param SCRIPT_FILENAME /home/$1/www/$2; | |
| 42 | fastcgi_pass 127.0.0.1:9000; | |
| 43 | } | |
| 44 | location ~ ^/~([^/]+)(|/.*)$ {
| |
| 45 | alias /home/$1/www/$2; | |
| 46 | index index.html; | |
| 47 | } | |
| 48 | } | |
| 49 | } | |
| 50 | } |