gpt4 book ai didi

linux - Ubuntu Nginx - Phpmyadmin 卡在登录状态

转载 作者:太空宇宙 更新时间:2023-11-04 11:53:12 25 4
gpt4 key购买 nike

我在我的 Lubuntu 服务器上从 apache2 迁移到 Nginx

我按如下方式配置了 phpmyadmin 站点,我可以从 localhost:88 成功导航到它。

命令:sudo nano etc/nginx/sites-available/phpmyadmin

server {

server_name _;
listen 88;
listen [::]:88;
listen 443 ssl http2;
listen [::]:443 ssl http2;

allow all;

# access_log logs/host.access.log;
# error_log logs/host.error.log;

root /usr/share/phpmyadmin;
index index.php;

location / {
# root /usr/share;
# index index.php;
try_files $uri $uri/ =404;
}

location ~ \.php$ {
# try_files $uri $document_root$fastcgi_script_name =404;

fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
include snippets/fastcgi-php.conf;
fastcgi_param HTTP_PROXY "";
fastcgi_param HTTPS on;
fastcgi_request_buffering off;
}
}

即使它在 localhost:88 上运行并且我尝试登录我的控制台,我也只是刷新了页面,没有任何错误或页面更改。

我错过了什么?

最佳答案

我不知道为什么,但删除 HTTPS 部分后它就可以工作了。现在我的配置文件如下所示:

server {

server_name _;
listen 88;
listen [::]:88;
# listen 443 ssl http2;
# listen [::]:443 ssl http2;

allow all;

# access_log logs/host.access.log;
# error_log logs/host.error.log;

root /usr/share/phpmyadmin;
index index.php;

location / {
# root /usr/share;
# index index.php;
try_files $uri $uri/ =404;
}

location ~ \.php$ {
# try_files $uri $document_root$fastcgi_script_name =404;

fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
include snippets/fastcgi-php.conf;
# fastcgi_param HTTP_PROXY "";
# fastcgi_param HTTPS on;
# fastcgi_request_buffering off;
}
}

如果有人知道为什么它现在有效,我很好奇

关于linux - Ubuntu Nginx - Phpmyadmin 卡在登录状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55379463/

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