Running two websites on one apache server

Running two websites on one apache server

multiple websites on one ip
how to host multiple websites on one ip address apache
host multiple websites on one server iis
how to host multiple websites on one server centos
host multiple websites on one server nginx
how to configure apache to host multiple websites
apache virtual host
how to run 2 websites on one server

I am running Ubuntu 16.04 LTS as a server and installed GitLab and OpenProject on it. However since I installed GitLab I can't access my OpenProject anymore, I've tried to forward it to a different port using the apache2 configs but it wouldn't work.


# This configuration has been tested on GitLab 8.2
# Note this config assumes unicorn is listening on default port 8080 and
# gitlab-workhorse is listening on port 8181. To allow gitlab-workhorse to
# listen on port 8181, edit or create /etc/default/gitlab and change or add the following:
# gitlab_workhorse_options="-listenUmask 0 -listenNetwork tcp -listenAddr -authBackend"
#Module dependencies
# mod_rewrite
# mod_proxy
# mod_proxy_http
<VirtualHost *:80>
  ServerSignature Off

  ProxyPreserveHost On

  # Ensure that encoded slashes are not decoded but left in their encoded state.
  AllowEncodedSlashes NoDecode

  <Location />
    # New authorization commands for apache 2.4 and up
    Require all granted

    #Allow forwarding to gitlab-workhorse
    ProxyPassReverse http://YOUR_SERVER_FQDN/

  # Apache equivalent of nginx try files
  RewriteEngine on

  #Forward all requests to gitlab-workhorse except existing files like error documents
  RewriteCond %{REQUEST_URI} ^/uploads/.*
  RewriteRule .*{REQUEST_URI} [P,QSA,NE]

  # needed for downloading attachments
  DocumentRoot /home/git/gitlab/public

  #Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up.
  ErrorDocument 404 /404.html
  ErrorDocument 422 /422.html
  ErrorDocument 500 /500.html
  ErrorDocument 502 /502.html
  ErrorDocument 503 /503.html

  # It is assumed that the log directory is in /var/log/httpd.
  # For Debian distributions you might want to change this to
  # /var/log/apache2.
  LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded
  ErrorLog /var/log/httpd/logs/YOUR_SERVER_FQDN_error.log
  CustomLog /var/log/httpd/logs/YOUR_SERVER_FQDN_forwarded.log common_forwarded
  CustomLog /var/log/httpd/logs/YOUR_SERVER_FQDN_access.log combined env=!dontlog
  CustomLog /var/log/httpd/logs/YOUR_SERVER_FQDN.log combined

<VirtualHost *:81>
  DocumentRoot /opt/openproject/public
Include /etc/apache2/sites-available/openproject.conf


Include /etc/openproject/addons/apache2/includes/server/*.conf

<VirtualHost *:81>
  DocumentRoot /opt/openproject/public

  ProxyRequests off

  Include /etc/openproject/addons/apache2/includes/vhost/*.conf

  # Can't use Location block since it would overshadow all the other proxypass directives on CentOS
  ProxyPass /openproject/ retry=0
  ProxyPassReverse /openproject/


# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 80
Listen 81

<IfModule ssl_module>
    Listen 443

<IfModule mod_gnutls.c>
    Listen 443

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

I have no clue what else I can do, thanks in advance!

Note: I want GitLab on port 80 and OpenProject on Port 81

EDIT: Both are running, it is just a matter of configuration EIDT: found what was causing the sites not being displayed. Nginx server was running by default from gitlab bundle

If you want to access both of the projects, it should be as simple as having both projects as 2 separate folders under webapps folder of apache, and accessing them via the name of the folder(localhost:8080/)

How to configure multiple websites with Apache web server , Step 5: Edit the Config File for Each Site. How to host multiple websites on Apache2 sites-available. With Apache2, all virtual hosts are configured in individual files with /etc/apache2/sites-available. sites-enabled. The interesting thing about Apache2 is that you can create as many .conf files in Congratulations. You've enabled a new

Gitlab was running Nginx server by default, disabled it so apache works

Can we run two websites on one server?, In this post, I will show you how to serve multiple websites using a single instance of Apache. Note: I wrote this article on a virtual machine  Based on the rest of your question, what you really want to do is run various sites on the same server with their own domain names. The best documentation you'll find on the topic is the virtual hostdocumentation in the apache manual. There are two types of virtual hosts: name-based and IP-based.

I'm also having this same issue. I changed gitlab port and restart gitlab and apache2 server gitlab working on port number 99 and make sure openproject install will ssl.

gitlab working on      : http://ip:99/users/sign_in
openproject working on : https://ip/openproject

Steps :

1. sudo vi /etc/gitlab/gitlab.rb
2. change port number : external_url "http://IP:99"
3. sudo gitlab-ctl reconfigure
4. sudo gitlab-ctl restart 
5. sudo service apache2 restart

Can I have 2 separated websites on 1 VPS?, How do I host multiple websites on one Linux server? Virtual hosting via Apache2 allows for a single server with single IP address to host multiple Apache2 web content. For instance, if you have one big server with more than enough resources, you can host multiple websites on that single machine.,, can all be hosted on the same server without purchasing additional servers. This is a great and fantastic way to host your many blogs using Apache2.

Host Multiple Domains on One Server or IP with Apache or Nginx , If you are running multiple business sites but don't want to host them separately, you can take advantage of Virtual Server in web servers. The concept to have multiple websites on a single web server instance is called Virtual Server. It is defined in the configuration file along with the URL. When a request is made to a defined URL, the webserver would serve the traffic from the respective Document Root. Configure Virtual Host in Apache to host multiple domains

Host Multiple Websites on a Single Server with Apache on Ubuntu , If you have one big server with extensive resources like lots of HDD space, RAM, and CPU power, then you can host multiple websites using  An Apache web server set up and configured by following How to Install the Apache Web Server on Ubuntu 18.04. A domain name configured to point to your Ubuntu 18.04 server. You can learn how to point domains to DigitalOcean Droplets by following How To Point to DigitalOcean Nameservers From Common Domain Registrars .

How to run multiple sites on one apache instance, Your question is mixing a few different concepts. You started out saying you wanted to run sites on the same server using the same domain, but  I have a domain with two subdomains: and set an A-Record for both of them to my server's IP address. my server is a VPS with centos7 and has two directories below /var/www/html/ for each of the domains: