關於nginx 和tomcat的整合
不知道大家是如何實現這2個的整合的 我是這樣整合的
upstream tomcat {
server localhost:8080;
}
server
{
listen 80;
server_name www.aaa.com;
index index.html index.htm index.php index.jsp index.do;
root /data/htdocs/blog/ROOT;
location ~ .*\.(jsp|do|dhtml)?$
{
proxy_pass http://tomcat;
}
將php的路徑 指向到 tomc的ROOT 但是總覺得這樣不是太好 請問大家 都是怎麼設置路徑的呢
《解決方案》
有誰用過嗎
《解決方案》
我認為php jsp的路徑是可以在location里單獨指定的
《解決方案》
我覺得也應該是的 可是不會怎麼設置的啊
《解決方案》
location ~ .*\.(php|php5)?$
{
root /data/htdocs/blog/ROOT;
proxy_pass http://tomcat;
}
location下可以指定root