nginx ssi的配置,有关shtml的include报404

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/guo_yang/article/details/82186351

nginx中有关shtml的include另一个inc碎片时,页面报404.解决办法如下


        location / {

                ssi on;
                ssi_silent_errors on;
                ssi_types text/shtml;

                        root   /opt/cms5/data/fileroot/dl;
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                        send_timeout 3600;
                        fastcgi_buffers 8 128k;
                }

        location ~ .*\.(inc)$ {

            if (!-e $request_filename) {

             return 200;
           }

                                ssi on;
                ssi_silent_errors on;
                ssi_types text/shtml;

                        root   /opt/cms5/data/fileroot/dl;
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                        send_timeout 3600;
                        fastcgi_buffers 8 128k;
        }

及再找inc文件时,不存在则返回200状态码。

展开阅读全文
博主设置当前文章不允许评论。

SSH下修改web配置404 求教

05-22

默认的>rn[code=javascript]rn index!index.dorn [/code] 是可以访问到的 rnrn但是改成另一个路径就报404了,如下,希望大神帮我解答这个疑惑rn[code=javascript]rn /myaccount/index!index.dorn [/code]rnrnrn这是完整web.xml的配置, [code=javascript]rnrn rn etc_filern /WEB-INF/etc/conf/app-config.xmlrn rn rn contextConfigLocationrn classpath*:applicationContext.xmlrn rnrn rn encodingFilterrn rn dwz.framework.adapter.web.filter.EncodingFilterrn rn rn encodingrn UTF-8rn rn rn rn encodingFilterrn /*rn rn rn encodingFilterrn actionrn rnrn rnrn rn sessionValidatern rn dwz.framework.adapter.web.filter.SessionValidateFilterrn rn rn urirn rn /myaccount/user!forgetPassword.do,/index!,/validationCode!,/passport!rn rn rn rn loginUrlrn /index!login.dorn rn rn backToUrlrn /index!login.dorn rn rn debugrn truern rn rn rn sessionValidatern *.jsprn rn rn sessionValidatern *.dorn rn rn rn cleanuprn rn org.apache.struts2.dispatcher.ActionContextCleanUprn rn rn rn cleanuprn /*rn rnrn rn sitemeshrn rn dwz.framework.adapter.web.filter.Struts2SiteMeshFilterrn rn rn rn sitemeshrn /*rn rnrn rn rn struts2rn rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rn rn configrn struts-default.xml, ../struts.xmlrn rn rn rn struts2rn /*rn rnrn rn rn dwz.framework.adapter.web.listener.AppContextInitListenerrn rn rnrn rn jdbc/apprn javax.sql.DataSourcern Containerrn Shareablern rn rn /myaccount/index!index.dorn rnrn[/code]rnrn这是struts的配置:[code=javascript]rnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn dojo\..*,^struts\..*rn rn rn rn input,back,cancel,browsern rn rn input,back,cancel,browsern rn rn rn rnrn rn /WEB-INF/jsp/common/$operationDone.jsprn /WEB-INF/jsp$proxy.namespace/$proxy.actionName/$proxy.method.jsprn rn rn rn rn rn rn rn rn rn rn $backToUrlrn /WEB-INF/jsp/myaccount/index/index.jsprn rn rn rn rn rn rn rn rn rn ../management/index!index.dorn rn rn rn rn rn rn rn ../myaccount/index!index.dorn /WEB-INF/jsp/management/index/loginDialog.jsprn rn rn rn rn rn rn rn rn rn rn rn rnrnrn[/code] 论坛

没有更多推荐了,返回首页