how to edit the nginx in one-clikc apps? i have followed this and set the gitlab done

Posted October 14, 2014 3.1k views

i have followed this and set the gitlab done
now i need set another app (in port 9700) in the server and how could i edit the nginx?(i try lsof -i :80 and find it was nginx that gitlab use) but i couldn’t find nginx setting file so i try (sudo apt-get install nginx) and it works (i find the setting file in /etc/nginx and i edit it and restart nginx but nothing worked), this is confused, does this ubuntu already has a nginx?

1 comment
  • So you want to have gitlab running on port HTTP/80 right? and another instance of nginx on port 9700?

    You need to edit the /etc/nginx/sites-enabled/default file and setup the prot for the standard app there

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.

Submit an Answer
1 answer

The one-click image uses GitLab’s “omnibus” installer. It is designed to be single purpose, but of course you are free to hack on it. GitLab installs its own bundled copy of Nginx to /opt/gitlab/embedded/ This is managed by Chef scripts, and it’s configuration files should not be edited directly as your changes will be overwritten.

You’d be best off installing the default nginx package along side of the bundled one. Of course, as you’ve noticed it will initially fail to start. This is because GitLab is already bound to port 80. You’ll need to edit the default Nginx configuration to listen on the new port first. Open /etc/nginx/sites-enabled/default and change:

server {
        listen 80 default_server;
        listen [::]:80 default_server ipv6only=on;


server {
        listen 9700 default_server;
        listen [::]:9700 default_server ipv6only=on;

and start Nginx:

sudo service nginx start

You should now be able to view the Nginx default page at http://your.ip.address:9700