project path use as domain in nginx -tomcat -


spring java project run in server. added new domain, works, when click link goes http://127.0.0.1:8081/ instead of example.com

server {   listen          80;    server_name     www.example.com example.com;       root            /opt/appserv/travel_server/webapps/example;  location ~* \.(js|jpg|png|css)$ {         root /opt/appserv/travel_server/webapps/example/;         expires 30d;     }    location / {         proxy_set_header x-forwarded-host $host;         proxy_set_header x-forwarded-server $host;         proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;         proxy_pass http://127.0.0.1:8081/example;   } } 

    server {   listen          80;    server_name     www.example.com example.com   #server_name_in_redirect off;   root            /opt/appserv/travel_server/webapps/example;  location ~* \.(js|jpg|png|css)$ {         root /opt/appserv/travel_server/webapps/example/;         expires 30d;     }   location ~* ^/(.*) {         proxy_set_header x-forwarded-host $host;         proxy_set_header x-forwarded-server $host;         proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;         proxy_pass http://127.0.0.1:8081/example/$1;   } } 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -