这里会显示出您选择的修订版和当前版本之间的差别。
note:spoony:phpbb-nginx-配置 [2018/06/23 22:41] Spoony 创建 |
note:spoony:phpbb-nginx-配置 [2018/06/23 22:42] Spoony |
||
---|---|---|---|
行 1: | 行 1: | ||
====== phpbb nginx 配置 ====== | ====== phpbb nginx 配置 ====== | ||
- | [code] | + | <code> |
server { | server { | ||
listen 80; | listen 80; | ||
行 38: | 行 38: | ||
} | } | ||
- | [/code] | + | </code> |
+ | |||
+ | <code> | ||
+ | server { | ||
+ | listen 80; | ||
+ | server_name phpbb32.example.com; | ||
+ | |||
+ | |||
+ | server_name_in_redirect off; | ||
+ | |||
+ | root /home/davidyin/phpbb32.example.com; | ||
+ | |||
+ | |||
+ | index index.php; | ||
+ | |||
+ | location / { | ||
+ | try_files $uri $uri/ =404; | ||
+ | if (!-e $request_filename) { | ||
+ | rewrite ^(.*)$ /phpBB/app.php; | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | location /install/app.php { | ||
+ | try_files $uri $uri/ /phpBB/install/app.php?$query_string; | ||
+ | } | ||
+ | |||
+ | location /app.php { | ||
+ | try_files $uri $uri/ /phpBB/app.php?$query_string; | ||
+ | } | ||
+ | |||
+ | |||
+ | location ~ \.php$ { | ||
+ | include snippets/fastcgi-php.conf; | ||
+ | |||
+ | # With php7-fpm: | ||
+ | fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; | ||
+ | } | ||
+ | |||
+ | } | ||
+ | </code> |