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; ...
评论