配置片段
error_page 404 /404.html;
location = /404.html {
root html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
把404.html,50x.html放到html下,
页面内引用的静态资源,建议采用/开头(静态资源也放到html下)
404页面内容太少,IE下无效的解决办法
web.xml配置404,500自定义错误页面无效的解决办法
http://happyqing.iteye.com/blog/2196958
相关推荐
有关nginx配置文件的语法的信息,请参阅官方文档(特别是《入门指南》)。 如果您希望采用默认配置,请使用以下类似内容从运行的nginx容器中复制它: $ docker run --name tmp-nginx-container -d nginx $ ...
error_page 500 502 503 504 /50x.html; location = /50x.html { root /root; } #静态文件,nginx自己处理 location ~ ^/(images|javascript|js|css|flash|media|static)/ { root /var/www/virtual/htdocs;...
升级后nginx主要配置为location / { root html; index index.html index.htm; proxy_pass http://localhost:8809/; proxy_set_header Host $host; proxy_http_version 1.1; #proxy_set_header X-...
在nginx中 nginx.conf 添加对应的serve配置配置如下: server { listen 9999; server_name localhost; location / { root /opt/html; try_files $uri $uri/ /index.html last; index index.html index.htm; }...
修改apache的配置文件,整合php vim /usr/local/apache2/conf/httpd.conf 53 LoadModule php5_module modules/libphp5.so 98 rverName 127.0.0.1:80 106 cumentRoot "/usr/local/apache2/htdocs/zabbix" ...
# proxy_set_header X-Real-IP $remote_addr; # proxy_set_header X-Scheme $scheme; # proxy_pass http://192.168.2.37; #} location / { proxy...
3.编辑Nginx配置41.server_location_*或站点配置,修改为对应端口 3.运行xServer.bat,选择[重建配置],再选择[重启服务] 四、如何修改WEB根目录 1.编辑anrip\config.php,修改[XS.WEB]的值 2.建立[XS.WEB]对应目录...
3、修改nginx配置文件: vi /usr/local/nginx/conf/nginx.conf 加入以下内容: rtmp { server { listen 1935; #监听的端口 chunk_size 4000; application hls { #rtmp推流请求路径 live on; hls...
centos6.x yum默认没有nginx的软件包 安装方式: 到nginx下载页面http://nginx.org/en/linux_packages.html#stable,复制CENTOS 6的nginx软件源安装包 运行命令:wget ...
1.1修改tomcat8.x/conf/context.xml的配置如下: <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this ...
3.这里只需要修改Nginx的配置,让它通过tomcat来转发,所以我们在这一步只需要在nginx.conf中添加几行代码就行。 如果看不懂 。建议直接拿我替来用。 Copy下面的内容 替换 你的nginx.conf注意黄色端口要改为你的。 ...
nginx虚拟主机配置 server { listen 80; server_name localhost; location / { root html; index index.html index.htm; } error_page 404 /404.html; # redirect server error pages to the static page /...
proxy_set_header X-Real-IP $remote_addr; location /app/ { # 动态页面,交给tomcat处理 proxy_pass http://127.0.0.1:8080; } location / { # 动态页面,交给tomcat处理 proxy_pass ...
如果静态文件后缀配置的不是html,则请把rewrite配置文件中的.html替换为对应的后缀如.html iis6.x 下使用 httpd.ini iis7.x 下使用web.config apache下使用 .htaccess (编辑.htaccess文件,把 RewriteBase /maccms8...
本机缓存设置 ...error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } 自动显示目录 location / { autoindex on; } 此外,还可以添加两个参数 autoindex_exact_size off; 默认
此文适合那些刚刚接触php,想要学习并想要自己搭建Nginx+... (1)nginx-1.10.1.zip,下载链接为http://nginx.org/en/download.html 。我个人选择了稳定版。 (2)php-5.6.25-nts-Win32-VC11-x86.zip或x64.zi
预先配置为可与Symfony 3.x / 4.x一起使用的容器,该容器提供: NGINX 1.17+ PHP 5.4-7.x(使用:pdo_mysql,pdo_sqlite,pdo_pgsql,pcntl,日历,phar,mysqli,gd,pdo,xml,opcache) 带有PIP的Python 3 7...
大家都知道,nginx配置文件通过使用add_header指令来设置response header。 昨天无聊用curl查看一个站点的信息,发现返回的头部与想象中的不一样: HTTP/2 200 date: Thu, 07 Feb 2019 04:26:38 GMT content-type: ...
该程序包集成最新的Apache+Nginx+LightTPD+PHP+MySQL+phpMyAdmin+Zend Optimizer+Zend Loader,一次性安装,无须配置即可使用,是非常方便、好用的PHP调试环境。该程序绿色小巧简易迷你仅有35M,有专门的控制面板。...