[英]Using Nginx as reverse proxy for wordpress on Apache in CentOS
[英]nginx as reverse proxy for runining apache
將nginx
配置為反向代理時遇到一些麻煩。
可以說我安裝了帶有kloxo
和webmin
的VPS,並且在我的VPS上運行多個域。
我已經通過REPEL
和YUM
安裝了nginx
,這是此鏈接中給出的/etc/nginx/nginx.conf
文件。
我將apache端口更改為8080,然后重新啟動服務以進行更改,然后啟動nginx,出現了一些問題。
當我嘗試訪問centos vps上的每個域時,我都面對APACHE START PAGE (WELCOME PAGE)
NGINX START PAGE (WELCOME PAGE)
APACHE START PAGE (WELCOME PAGE)
,當我在xxxx
瀏覽器中輸入我的VPS IP時,我面對NGINX START PAGE (WELCOME PAGE)
。
我希望nginx
提供我的靜態文件,並將動態文件重定向到Apache
,以獲得更好的性能。
Nginx Http Server,第235頁中有一個示例。
server {
server_name .example.com;
root /home/example.com/www;
location ~* \.php.$ {
# Proxy all requests with an URI ending with .php*
# (includes PHP, PHP3, PHP4, PHP5...)
proxy_pass http://127.0.0.1:8080;
}
location / {
# Your other options here for static content
# for example cache control, alias...
expires 30d;
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.