跳轉到內容
View in the app

A better way to browse. Learn more.

PHP論壇人

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

vBulletin 6.0 Nginx 伪静态 真实配置文件

精選回覆

發表於

贴一个我自己的真实配置文件:

server {
    listen 80;
    server_name  d.hxzylt.com;
    rewrite ^ https://$server_name$request_uri? permanent; 
}

server
  {
  listen 443 ssl;
  listen 443 quic reuseport;
  server_name  d.hxzylt.com;
  ssl_certificate      /etc/pki/tls/certs/hxzylt/hxzylt.com.crt;
  ssl_certificate_key  /etc/pki/tls/certs/hxzylt/hxzylt.com.key;
  add_header Alt-Svc 'h3=":443"';
  add_header QUIC-Status $http3;
  add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
  add_header Content-Security-Policy-Report-Only "default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:";

    index index.php index.html index.htm;
#    proxy_redirect              off;
#    proxy_set_header            Host $host;
#    proxy_set_header            X-real-ip $remote_addr;
#    proxy_set_header            X-Forwarded-For $proxy_add_x_forwarded_for;
#    real_ip_header X-Forwarded-For;
     add_header X-Frame-Options "SAMEORIGIN";

   # Allow only GET,POST to visit website 
        if ($request_method !~* GET|POST) {
            return 403;
        }

    root  /website/hxzylt/xf;
    
    # configuration rules
        # legacy css being handled separate for performance
        location = /css\.php {
                rewrite ^ /core/css.php break;
        }

        # make install available from presentation
        location ^~ /install {
                rewrite ^/install/ /core/install/ break;
        }

        # any request to not existing item gets redirected through routestring
        location / {
                if (!-f $request_filename) {
                        rewrite ^/(.*)$ /index.php?routestring=$1 last;
                }
        }

        # make admincp available from presentation
        location ^~ /admincp {
                if (!-f $request_filename) {
                        rewrite ^/admincp/(.*)$ /index.php?routestring=admincp/$1 last;
                }
        }

 # process any php scripts, not found gets redirected through routestring
        location ~ \.php$ {
                # handles legacy scripts
                if (!-f $request_filename) {
                        rewrite ^/(.*)$ /index.php?routestring=$1 break;
                }
        root  /website/hxzylt/xf;
    fastcgi_pass   127.0.0.1:9001;
    #fastcgi_pass   unix:/var/opt/remi/php80/run/php-fpm/www.sock;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include        fastcgi_params;

    brotli on;
    brotli_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/octet-stream;

    gzip on;
    gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/octet-stream;

#    expires 3d;
    }
   }

本文章最後於,由Jack編輯

  • 樓主

vb6的rewrite就是这部分,看准位置:

# configuration rules
        # legacy css being handled separate for performance
        location = /css\.php {
                rewrite ^ /core/css.php break;
        }

        # make install available from presentation
        location ^~ /install {
                rewrite ^/install/ /core/install/ break;
        }

        # any request to not existing item gets redirected through routestring
        location / {
                if (!-f $request_filename) {
                        rewrite ^/(.*)$ /index.php?routestring=$1 last;
                }
        }

        # make admincp available from presentation
        location ^~ /admincp {
                if (!-f $request_filename) {
                        rewrite ^/admincp/(.*)$ /index.php?routestring=admincp/$1 last;
                }
        }

 # process any php scripts, not found gets redirected through routestring
        location ~ \.php$ {
                # handles legacy scripts
                if (!-f $request_filename) {
                        rewrite ^/(.*)$ /index.php?routestring=$1 break;
                }

建立帳號或登入後發表意見

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.