gpt4 book ai didi

laravel - phpmyadmin 显示 404 在 nginx 中找不到

转载 作者:行者123 更新时间:2023-12-04 18:50:10 24 4
gpt4 key购买 nike

我部署了我的 laravel 应用程序,它工作正常。我的默认文件

server {
listen 80 default_server;
listen [::]:80 default_server;

root /var/www/html/partex-star/public;

# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;

server_name 103.209.11.41;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php$is_args$args;
}


location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
}


然后我添加这些代码以通过 http://ip_address/PhpMyAdmin 访问我的 phpmyadmin。但现在,它显示 404 未找到。

location /phpmyadmin {
alias /usr/share/nginx/html/phpmyadmin;
try_files $uri @phpmyadmin;
allow 103.209.11.41;
deny all;

index index.php;
location ~* \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}

我已经创建了符号链接(symbolic link)。

最佳答案

你能用这个链接吗?它应该可以工作http://103.209.11.41/phpmyadmin/index.php

关于laravel - phpmyadmin 显示 404 在 nginx 中找不到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60134373/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com