我已经成立了Nginx的作为我的主服务器,并且有它背后的两个基于服务器了Mochiweb。 某些请求反向代理到这两个服务器。 现在,我想访问的phpmyadmin(位于位于/ var / WWW / nginx的默认/ phpMyAdmin的)使用nginx的,但它口口声声说错误404未找到。 我失去了一些东西明显在这里吗?
server {
############### General Settings ####################
listen 80;
server_name localhost;
access_log /home/me/dev/wwwaccess.log;
############## Document Root #######################
location / {
root /home/me/dev;
index index.html index.htm index.php;
}
############## PHPMyAdmin #######################
location /phpmyadmin {
root /var/www/nginx-default/phpMyAdmin;
index index.html index.htm index.php;
}
############## Proxy Settings for FastCGI Server #####
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/me/dev$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
############# Proxy Settings for Mochi1 ###############
location /mochi1 {
proxy_pass http://127.0.0.1:8000;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 3600;
proxy_buffering off;
}
############# Proxy Settings for Mochi2 ###############
location /mochi2 {
proxy_pass http://127.0.0.1:8001;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 3600;
proxy_buffering off;
}
############# Error redirection pages ################
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /home/me/dev;
}
}