添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

在添加httpauth时文件意外结束

0 人关注

我试图用nginx http auth保护我的phpMyAdmin,但是,当我添加auth指令时,nginx -t说。

nginx。在/etc/nginx/conf.d/default.conf:22中,[emerg]文件的结尾出乎意料,希望是"; "或"}"。
nginx:配置文件/etc/nginx/nginx.conf测试失败。

server {
    listen 80;
    server_name x.x.x.x;
    root /var/www/html/mypma;
    index index.php index.html index.htm index.nginx-debian.html;
    location = / {
    return 444;
    location = /pma {
    auth_basic "Area riservata”;
    auth_basic_user_file /etc/apache2/.htpasswd;
    location ~ .php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;