我已经将Nginx设置为我的主要Web服务器,并且后面有两个基于Mochiweb的服务器.某些请求被反向代理到这两个服务器.现在,我想使用nginx访问phpmyadmin(位于/ var/www/nginx-default/phpMyAdmin),但它一直说错误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 …Run Code Online (Sandbox Code Playgroud) nginx ×1