2012/11/13

reverse proxy without apache http server



在 $tomcat_home\conf\server.xml 中修改以下內容

 

<host appbase="" name="localhost" p="">unpackWARs="true" autoDeploy="true"  
 xmlValidation="false" xmlNamespaceAware="false"&gt;  
 <valve classname="org.apache.catalina.valves.AccessLogValve" directory="logs" p="">prefix="appName_access_log." suffix=".txt"  
 pattern="%h %l %u %t "%r" %s %b" resolveHosts="false"/&gt;  
 <context docbase="webapps/appName" path="" reloadable="false"></context>  
 </valve>
</host>  

2012/11/12

Amazon EC2 Running Tomcat on port 80

SSH command:

#sudo /sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

#sudo /sbin/service iptables save

server.xml:


#service tomcat7 restart

NGINX SSL/設定檔案

#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #...