How i run ghost in subdomain ?


this my first time setup ghost blog so i try to put it in subdomain but i don’t know how, i use nginx and ubuntu 12.0.4 LTS …

i need it to work in subdomain so i can put another thing in main…

also i have another issue when i type my domain without www it’s not work !! you can check

help me please

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.

@wjhsie: <pre>proxy_set_header X-Real-IP $remote_addr; <br>proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; <br>proxy_set_header X-Forwarded-Proto $scheme; <br>proxy_set_header Host $http_host; <br>proxy_set_header X-NginX-Proxy true; <br>[…] <br>proxy_set_header Upgrade $http_upgrade; <br>proxy_set_header Connection “upgrade”; </pre>sets the headers nginx should add while proxying the contents to Ghost/nodejs<pre>proxy_read_timeout 5m; <br>proxy_connect_timeout 5m; </pre>sets a couple of connection parameters.<pre>proxy_pass; </pre>sets the server nginx should proxy to (in this case it’s a nodejs app that is listening on port 1337 on the loopback interface). <br> <br>As for the proxy_redirect line, see <a href=“”></a>. <br> <br>I hope that helps.

What is this block of code actually doing? <br> <br>location / { <br>expires 8d; <br>proxy_set_header X-Real-IP $remote_addr; <br>proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; <br>proxy_set_header X-Forwarded-Proto $scheme; <br>proxy_set_header Host $http_host; <br>proxy_set_header X-NginX-Proxy true; <br>proxy_read_timeout 5m; <br>proxy_connect_timeout 5m; <br>proxy_pass; <br>proxy_redirect off; <br>proxy_set_header Upgrade $http_upgrade; <br>proxy_set_header Connection “upgrade”; <br>} <br> <br>Is this in the default.conf file? Or is this the customized config file in the sites-available directory?

I don’t see any of or there, are you sure this is the only config file?