首页 > 编程知识 正文

centos7配置静态ip地址和网关,pve修改管理地址

时间:2023-05-03 10:03:55 阅读:115843 作者:3812

hellopasswd

nginx域名重定向

server_name后面支持写入多个域名。 这里与httpd进行比较

permanent是永久重定向,状态写为301,写为redirect则为302

1服务器

2 {

3 listen 80

4 server _ name test.com test1.com test2.com;

5 index index.htmlindex.htm index.PHP;

6 root /data/wwwroot/test.com;

7if($host!='test.com ' ) {

8rewrite^/(.* ) $ http://test.com/$1 permanent;

9 }

10

11location ().* )管理员. PHP $

12 {

13 auth_basic 'Auth ';

14 auth _ basic _ user _ file/usr/local/nginx/conf/htpasswd;

15 }

16 }

nginx 3360 theconfigurationfile/usr/local/nginx/conf/nginx.confsyntaxisok

nginx :配置文件/usr/local/nginx/conf/nginx.conftestissuccessful

Date: Fri,02 Mar 2018 08:10:08聆听夕阳/p Connection: keep-alive

location :http://test.com/index.html

Date: Fri,02 Mar 2018 08:11:27聆听的夕阳/p Last-Modified: Sat,03 Feb 2018 02:28:08聆听的夕阳/pconnection3360keep-

ETag: '5a751e38-6 '

accept-ranges :字节

Date: Fri,02 Mar 2018 08:11:31聆听夕阳/p Connection: keep-alive

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。