首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Nginx镜像bug上的SMF

Nginx镜像bug上的SMF
EN

Stack Overflow用户
提问于 2014-06-05 22:02:40
回答 1查看 482关注 0票数 0

http://62-210.217.242/forums/

我有所有正确的nginx conf和权限,谁能给我一个洞察可能导致这个问题的原因?

我试过用location /forums { try_files /forums/$uri/ /forums/$uri /forums/index.php; }修复它,但没有成功。谢谢。

它似乎无法获取主题文件夹中的图像,尽管它们存在。

以下是完整的配置:

代码语言:javascript
复制
        server {
        listen 8080;
        #listen [::]:80 default_server ipv6only=on;
        root /usr/share/nginx/html;
        index index.html index.php;

        server_name localhost;

        location /forums {
        try_files /forums/$uri/ /forums/$uri /forums/index.php;
        }
        location / {
                try_files $uri $uri/ /index.php;
        }

        #error_page 404 /404.html;

        # redirect server error pages to the static page /50x.html
        #
        #error_page 500 502 503 504 /50x.html;
        #location = /50x.html {
        #       root /usr/share/nginx/html;
        #}

        location ~ \.php$ {
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                include fastcgi_params;
        }
}

nginx.conf

代码语言:javascript
复制
user www-data;
worker_processes 16;
pid /run/nginx.pid;

events {
        worker_connections 5768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##
        server_tokens off;
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;
        port_in_redirect off;
        gzip on;
        gzip_types text/css text/xml text/javascript application/x-javascript;
        gzip_vary on;
        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # Logging Settings
        ##

        access_log off;
        error_log /var/log/nginx/error.log;

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}
EN

回答 1

Stack Overflow用户

发布于 2014-06-05 23:45:24

尝试:

代码语言:javascript
复制
location /forums {
    try_files $uri $uri/ /forums/index.php;
}

$uri变量已包含/forum前缀。没有必要添加它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24062308

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档