Question

Configuring Owncloud + Gitlab + Regular Webserver! Help

Hello!

Im using Ubuntu 16.04 for this. I need help configuring Gitlab, Owncloud, and a regular webserver all in one.

I first installed LAMP as shown here: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04

I then installed OwnCloud as shown here: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-owncloud-on-ubuntu-16-04

I then installed Gitlab as shown here: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-gitlab-on-ubuntu-16-04

Then I configured Apache to connect to Gitlab using this guide: https://kevingoedecke.me/2015/09/17/setup-gitlab-on-debian-7-with-existing-apache-webserver/

Now, my ideal setup is to have a subdomain point to each service as shown here:

After I configured Apache to connect to gitlab, all of a sudden, all 3 subdomains all go to Gitlab. I can no longer see the default apache2 html folder or my owncloud (www.mydomain.com/owncloud/ now redirects to gitlab)

How do I fix this?

Subscribe
Share

The first thing that jumps out is that it appears you only have a single name based virtualhost configured in here for gitlab.mydomain.com.

You’ll need to also have virtualhosts configured with ServerName or ServerAlias set to www.mydomain.com and owncloud.mydomain.com pointed to each webroot.

Without these, your server will not know how to handle those differently and will default to serve them simply by using the first virtualhost defined in your configuration.

Sure, this is what is in my sites-available folder:

000-default.conf: https://pastebin.com/raw/f2JpJh9D

default-ssl.conf: https://pastebin.com/raw/6eUtiXev

gitlab.conf: https://pastebin.com/raw/EVkjSPCL

I did not touch 000-default or default-ssl, also I do not have any SSL configured yet.

Can you share your current apache configuration for the three subdomains? Seeing this might help us to identify an issue and help you troubleshoot.


Submit an 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.

This question was answered by @ryanpq:

The first thing that jumps out is that it appears you only have a single name based virtualhost configured in here for gitlab.mydomain.com.

You’ll need to also have virtualhosts configured with ServerName or ServerAlias set to www.mydomain.com and owncloud.mydomain.com pointed to each webroot.

Without these, your server will not know how to handle those differently and will default to serve them simply by using the first virtualhost defined in your configuration.

View the original comment