全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1348|回复: 9

LZ一头雾水,lnmp1.5装h5ai报错403

[复制链接]
发表于 2018-9-1 17:39:00 | 显示全部楼层 |阅读模式
本帖最后由 cnlanny 于 2018-9-1 18:03 编辑

LZ一头雾水,lnmp1.5装h5ai报错403
改了域名的.conf也不行
执行了lnmp restart 访问域名报错403
怎么解决大佬们?

  1. server
  2.     {
  3.         listen 80;
  4.         #listen [::]:80;
  5.         server_name xxx.com www.xxx.com;
  6.         index index.html index.php /_h5ai/public/index.php;
  7.         root  /home/wwwroot/xxx.com;

  8.         include rewrite/none.conf;
  9.         #error_page   404   /404.html;

  10.         # Deny access to PHP files in specific directory
  11.         #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

  12.         include enable-php.conf;

  13.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  14.         {
  15.             expires      30d;
  16.         }

  17.         location ~ .*\.(js|css)?$
  18.         {
  19.             expires      12h;
  20.         }

  21.         location ~ /.well-known {
  22.             allow all;
  23.         }

  24.         location ~ /\.
  25.         {
  26.             deny all;
  27.         }

  28.         access_log  /home/wwwlogs/xxx.com.log;
  29.     }

  30. server
  31.     {
  32.         listen 443 ssl http2;
  33.         #listen [::]:443 ssl http2;
  34.         server_name xxx.com www.xxx.com;
  35.         index index.html index.htm index.php default.html default.htm default.php;
  36.         root  /home/wwwroot/xxx.com;
  37.         ssl on;
  38.         ssl_certificate /usr/local/nginx/conf/ssl/xxx.com/fullchain.cer;
  39.         ssl_certificate_key /usr/local/nginx/conf/ssl/xxx.com/xxx.com.key;
  40.         ssl_session_timeout 5m;
  41.         ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  42.         ssl_prefer_server_ciphers on;
  43.         ssl_ciphers "EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
  44.         ssl_session_cache builtin:1000 shared:SSL:10m;
  45.         # openssl dhparam -out /usr/local/nginx/conf/ssl/dhparam.pem 2048
  46.         ssl_dhparam /usr/local/nginx/conf/ssl/dhparam.pem;

  47.         include rewrite/none.conf;
  48.         #error_page   404   /404.html;

  49.         # Deny access to PHP files in specific directory
  50.         #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

  51.         include enable-php.conf;

  52.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  53.         {
  54.             expires      30d;
  55.         }

  56.         location ~ .*\.(js|css)?$
  57.         {
  58.             expires      12h;
  59.         }

  60.         location ~ /.well-known {
  61.             allow all;
  62.         }

  63.         location ~ /\.
  64.         {
  65.             deny all;
  66.         }

  67.         access_log  /home/wwwlogs/xxx.com.log;
  68.     }
复制代码


大佬们帮我看下啥问题

-------------------------------------------------------------------------------------
chmod -R 755 /home/wwwroot/xxx.com/
chmod -R 755 /home/wwwroot/xxx.com/_h5ai/
chmod -R 755 /home/wwwroot/xxx.com/_h5ai/public/

我给了这些目录的755权限 还是403!



发表于 2018-9-1 17:49:37 来自手机 | 显示全部楼层
设置h5ai目录文件权限。
发表于 2018-9-1 17:50:00 来自手机 | 显示全部楼层
网站目录 chown -R www:www ./
 楼主| 发表于 2018-9-1 17:52:32 来自手机 | 显示全部楼层
EdGaming 发表于 2018-9-1 17:50
网站目录 chown -R www:www ./

我给了网站根目录这个权限还是403
 楼主| 发表于 2018-9-1 18:03:30 | 显示全部楼层
chmod -R 755 /home/wwwroot/xxx.com/
chmod -R 755 /home/wwwroot/xxx.com/_h5ai/
chmod -R 755 /home/wwwroot/xxx.com/_h5ai/public/

我给了这些目录的755权限 还是403!
发表于 2018-9-1 18:03:38 | 显示全部楼层
禁用函数看看?
发表于 2018-9-1 18:14:07 | 显示全部楼层
改80 443不改?
 楼主| 发表于 2018-9-1 18:15:00 来自手机 | 显示全部楼层
陈道临 发表于 2018-9-1 18:14
改80 443不改?

还是大佬直接,我才发现!大佬威武!
发表于 2018-9-1 18:33:51 来自手机 | 显示全部楼层
是不是设置https了
 楼主| 发表于 2018-9-1 18:43:52 | 显示全部楼层
YunLan 发表于 2018-9-1 18:33
是不是设置https了

是设置了https
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-3-9 16:10 , Processed in 0.062881 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表