Report this

What is the reason for this report?

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

Posted on November 7, 2016

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



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!

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.

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!

Yes, i use digital ocean. Try it. Thanks

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 --> @*

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.