Question

i would like the site you currently have at http://ipserver:8080/project/ to be served as www.example.com. I use glassfish server. Thanks

i would like the site you currently have at http://ipserver:8080/project/ to be served as www.example.com. I use glassfish server. Thanks


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Good morning, yesterday configure from digital ocean and nginx as they left me in the last comment, but until now I do not work the url with the www. Am I missing something else?

I send you my settings.

In nginx in the example.com file

server {
         Listen 80;
         Listen [::]: 80;

         Server_name example.com www.example.com;

         Location / {
         Proxy_pass http: // ipServer: 8080 / Example /;
         Proxy_set_header Host $ host;
         Proxy_set_header X-Real-IP $ remote_addr;
         Proxy_set_header X-Forwarded-For $ proxy_add_x_forwarded_for;
         Proxy_set_header X-Forwarded-Proto $ scheme;
         }
}

** In digital ocean **

*A @ --> ipServer

CNAME www --> @*

Yes, i use digital ocean. Try it. Thanks

It worked perfect. The only detail left is:

example.com works www.example.com not work

I need some configuration to accept the www?

Thanks again!