OLAINDEX icon indicating copy to clipboard operation
OLAINDEX copied to clipboard

404 | 未设置账号

Open Gladtbam opened this issue 2 years ago • 0 comments

  • 操作系统版本:Windows 10 专业工作站版 21H2
  • Apache/NGINX 版本:Apache 2.4 / Nginx 1.20.1
  • PHP 版本:7.4
  • OLAINDEX 版本:6.0 (git clone --depth=1)
  • 浏览器版本:Microsoft Edge 105.0.1343.27

image

Nginx:

server
    {
        listen 80;
        #listen [::]:80;
        server_name example.com ;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/example.com/public;

        #error_page   404   /404.html;

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

        include proxy-pass-php.conf;

        rewrite ^(.*)$  https://$host$1 permanent;

        access_log  /home/wwwlogs/example.com.log;
    }

server
    {
        listen 443 ssl http2;
        #listen [::]:443 ssl http2;
        server_name example.com ;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/example.com/public;

        add_header X-Frame-Options "SAMEORIGIN";
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Content-Type-Options "nosniff";

        ssl_certificate /usr/local/nginx/conf/ssl/example.com/fullchain.cer;
        ssl_certificate_key /usr/local/nginx/conf/ssl/example.com/example.com.key;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
        ssl_prefer_server_ciphers on;
        ssl_ciphers "TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
        ssl_session_cache builtin:1000 shared:SSL:10m;
        # openssl dhparam -out /usr/local/nginx/conf/ssl/dhparam.pem 2048
        ssl_dhparam /usr/local/nginx/conf/ssl/dhparam.pem;

        error_page   404   /index.php.html;

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

        include proxy-pass-php.conf;

        location ~ / {
            try_files $uri $uri/ /index.php?$query_string;
        }

        location = /favicon.ico { access_log off; log_not_found off; }
        location = /robots.txt  { access_log off; log_not_found off; }
        location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param  SCRIPT_FILENAME /home/wwwroot/example.com.top/public/index.php;
            include fastcgi_params;
        }

        access_log  /home/wwwlogs/example.com.log;
    }

Apache:

<VirtualHost *:88>
ServerAdmin [email protected]
php_admin_value open_basedir "/home/wwwroot/example.com:/tmp/:/var/tmp/:/proc/"
DocumentRoot "/home/wwwroot/example.com/public"
ServerName example.com
ErrorLog "/home/wwwlogs/example.com-error_log"
CustomLog "/home/wwwlogs/example.com-access_log" combined
<Directory "/home/wwwroot/example.com/public">
    SetOutputFilter DEFLATE
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    DirectoryIndex index.html index.php
</Directory>
</VirtualHost>

Gladtbam avatar Sep 08 '22 07:09 Gladtbam