Nginx设置反向袋里

首先找到/etc/nginx/conf.d,将路径下的default.conf文件修改(或者删除,然后新建任意名称但以.conf为后缀的配置文件)为以下内容:

## Basic reverse proxy server ##

## Apache backend for www.ktsee.com ##

upstream apachephp {

server ktsee.com:80; #Apache

}

## Start www.ktsee.com ##

server {

listen 80;

server_name www.ktsee.com;

access_log off;

##access_log logs/ktsee.access.log main;

##error_log logs/ktsee.error.log;

##root html;

index index.html index.htm index.php;

## send request back to apache ##

location / {

proxy_pass http://apachephp;

#Proxy Settings

proxy_redirect off;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;

proxy_max_temp_file_size 0;

proxy_connect_timeout 90;

proxy_send_timeout 90;

proxy_read_timeout 90;

proxy_buffer_size 4k;

proxy_buffers 4 32k;

proxy_busy_buffers_size 64k;

proxy_temp_file_write_size 64k;

}

}

## End www.ktsee.com ##

之后输入

service nginx restart

重启nginx服务即可

评论

Popular Posts

其实所有的电影都很枯燥

90个你不知道的冷门知识及精彩点评

mihomo各平台客户端下载(windows, android, macos)

PHPWind 文件及数据结构相关文档

常用的国内外延迟测速链接(generate_204)

VPS线路详解:包括163、CN2 GT、CN2 GIA、AS4837、AS9929、CMI/CMIN2线路

整理RackNerd VPS促销活动机型表格

Windows Thin PC - 微软官方精简版Win7

解决Ubuntu桌面上Free Download Manager无法打开的问题

好好生活·享受幸福