this is my 1st question. If i make mistake, simply point it out & i'll improve it next time. I'm a Java Dev & new to Linux. I deploy my Spring MVC app on a VPS with Tomcat 7 and use nginx as a proxy server. After surfing over Internet for days, I see it might be a good combination instead of using tomcat with apache. I'm going to learn more about what nginx can do. At the moment, nginx handle SSL from client, Tomcat locates in the same machine & plays as a backend server with HTTP connector (no SSL between Tomcat & Nginx). I'm also use limit_req module as a basic HTTP Flood protection. I'm also know about APR - Tomcat native library when using Tomcat as a web server. Whenever I start my tomcat, it said that my APRis not found.
my nginx conf:
server {
listen 443 ssl;
server_name domain;
ssl on;
ssl_certificate /etc/nginx/ssl/domain.crt;
ssl_certificate_key /etc/nginx/ssl/domain.key;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarfed-For $proxy_add_x_forwarded_for;
}
}
server {
listen 80;
server_name domain;
return 301 https://$server_name$request_uri;
}
I'll try to answer your questions:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With