How to create an alias for a nginx virtual host?


–1 vote
asked Mar 13, 2016 by them2920 (1,130 points)
I have gitlab CE instance running in virtual machine in private VLAN.

4 Answers

0 votes
answered May 15, 2016 by ToHudec (480 points)
selected May 16, 2016 by by_will
 
Best answer
It will look like this:Welcome to Example
0 votes
answered Mar 30, 2016 by vg3482 (510 points)

Open it up by typing: sudo nano /etc/nginx/nginx.
We can additionally add any aliases that we want to match. Point it to the site's document root that you created: root /var/www/example.

See https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-14-04-lts for more details about it
commented Mar 31, 2016 by Dintino (1,520 points)
You can create like this and you can add action also like this. Your problem will be solved
commented Mar 31, 2016 by reffett (920 points)
I struggled with this recently with and older project. Copied from a duplicate
+1 vote
answered May 5, 2016 by Hilbert (560 points)
Kinda late but here is what I did after encountering this problem. See my answer here How to create an alias in nginx? - Nginx Forum is not good solution
0 votes
answered May 7, 2016 by No_607 (180 points)
There is a write up that I found very helpful Nginx - How to Configure Nginx - Linode

What is Geekub?

Q&A site for professional and enthusiast programmers, software developers and other technical users. With your help, we hope to work together to build a library of detailed answers to just about any question that is related to programming!







...