1

I have an issue with Openproject, Apache and other apps that are installed in /var/www/html.

When I try to connect to any app in /var/www/html or even index.html it doesn't work because it looks like Openproject conf file is 'redirecting' traffic to another folder (openproject folder I guess).

Here is my Openproject.conf

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

<VirtualHost *:80>
  ServerName tools.mydomain.com
  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/ http://127.0.0.1:6000/openproject/ retry=0
  ProxyPassReverse /openproject/ http://127.0.0.1:6000/openproject/
</VirtualHost>

Here is the content of my 000-default.conf:

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

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

When I change the ServerName in the openproject.conf to anything else than tools.mydomain.com I can access the apps in /var/www/html but I can't figure out how this works... I don't understand the way apache works like this..

Thanks for your help.

Tom
  • 57
  • 1
  • 8

4 Answers4

1

This is old thread but I had the same problem, as of the time I have installed OpenProject all my other VHOSTs stopped working. If I would disable OP, then all the rest worked properly.
I fixed it by changing OP ServerName to op-dev and port from *:80 to *:81, and one important place where this should also be done is within file:

/etc/openproject/addons/apache2/includes/server/20_repoman_svn_vhost.conf

Here you should also change :
"VirtualHost 127.0.0.1:80" to "VirtualHost *:80" and
ServerName can stay localhost.

Now, all VHOSTs are working properly.

Alicia
  • 1,152
  • 1
  • 23
  • 41
Miksha
  • 11
  • 1
0

Be careful with the port 80, because is very common for the most applications. First, try to reload apache.

sudo service apache2 reload

Next, see the output if this give error.

sudo journalctl -xe

If everything is ok, register the site

sudo a2ensite openproject

Reload apache again and add to /etc/hosts file the following line

127.0.1.1 tools.mydomain.com

Then, try to enter on http://tools.mydomain.com:[port]

maxwellnewage
  • 355
  • 2
  • 13
  • Not sure I was clear on my first message. I **can** access openproject with my config file. However I cannot access the other apps in `/var/www/html/`. – Tom Oct 26 '16 at 03:15
  • no, that's because you have to create other domains for that – maxwellnewage Oct 26 '16 at 14:31
0

All you need to do is fix that string:

 DocumentRoot /opt/openproject/public

to point to youre root /var/www/html/

-1

I had the same issue. If no ServerName of a virtual host configuration matches the client request header, the first virtual host in the apache2 configuration will be served. This is the default virtual host, because filename starts with 000. If ServerName in openproject's virtual host configuration matches the client request header, default virtual host won't be served any more.