#我可以访问http://www.example.com和http://www.example.com/info.php
$ls -la /var/www/html
-rw-r--r-- 1 root root 868 Nov 1 08:16 index.html
-rw-r--r-- 1 root root 21 Nov 1 08:13 info.PHP
我安装了PHPmyadmin并为PHPmyadmin文件创建了一个符号链接
lrwxrwxrwx 1 root root 21 Nov 1 08:37 PHPmyadmin -> /usr/share/PHPmyadmin
但试图得到http://www.example.com/phpmyadmin =>我得到了一个403 Forbidden
使用符号链接,我不应该将与PHPmyadmin相关的任何内容添加到我的Nginx.conf中……可能会丢失什么?
http://www.example.com/PHPmyadmin/index.PHP
我应该添加到我的默认con文件中直接获取它…我想我的try文件无效..
这是我的默认Nginx站点con文件
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/html;
index index.PHP,index.html index.htm;
server_name example.com;
location / {
try_files $uri $uri/ index.html index.PHP =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/html;
}
location ~ \.PHP${
try_files $uri =404;
fastcgi_split_path_info ^(.+\.PHP)(/.+)$;
fastcgi_pass unix:/var/run/PHP5-fpm.sock;
fastcgi_index index.PHP;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}