你好我已经安装了最新的稳定版本的Nginex(1.4.4),并且想安装PHPMyAdmin,不幸的是当我尝试在我的浏览器中通过http:// 192打开PHPMyAdmin时出现以下错误. . . / PHPMyAdmin的:
404 Not Found
Nginx/1.4.4
这是我的/etc/Nginx/Nginx.conf文件的内容:
user Nginx;
worker_processes 4;
error_log /var/log/Nginx/error.log warn;
pid /var/run/Nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/Nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/Nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/Nginx/conf.d/*.conf;
}
许多问候
解决方法:
在你的文档根目录中创建一个象征性的真的不是一个好主意,这只是在www中有一个phmyadmin快捷方式的问题.
正确的方法是创建一个名为PHP的文件并添加到/ etc / Nginx / sites-available.您可以复制下面的文件,但将端口号更改为其他内容.
server {
listen 30425;
# Don't want to log accesses.
#access_log /dev/null main;
access_log /var/log/Nginx/PHP.acces_log main;
error_log /var/log/Nginx/PHP.error_log info;
root /usr/share/PHPmyadmin;
index index.PHP index.html index.htm;
error_page 401 403 404 /404.PHP;
location ~ .*.PHP${
include fastcgi_p@R_502_6460@ms;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.PHP;
fastcgi_p@R_502_6460@m SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_p@R_502_6460@m SERVER_NAME $http_host;
fastcgi_ignore_client_abort on;
}
}
ln -s / etc / Nginx / sites-available / PHP // etc / Nginx / sites-enabled
现在您需要将此代码添加到Nginx.conf的Logging Settings部分
log_format main ‘$remote_addr – $remote_user [$time_local] ‘
‘”$request” $status $body_bytes_sent “$http_referer” ‘
‘”$http_user_agent” “$http_x_forwarded_for”‘ ;
现在您可以使用http://example.com:30425访问您的PHPmyadmin
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。