Content
OpenProject and other services via apache2
Added by Philipp Schulz 10 months ago
Hi all,
first of all apologies if this was already asked here.
I am currently trying to set up another service called MediaWiki that shall run on the same machine as my OpenProject installation. It's located in /var/www/html/mediawiki/
. Everything is hosted locally (without SSL) on an Ubuntu VM with the IP 192.168.1.181
since this setup is just for myself. I access OpenProject via the IP of the VM + the server path prefix /openproject/
. My apache2 config for OpenProject has the following content (i think this is what's being generated from setting up OpenProject the first time):
Include /etc/openproject/addons/apache2/includes/server/*.conf
IncludeOptional /etc/openproject/addons/apache2/custom/server/*.conf
<VirtualHost *:80>
ServerName 192.168.1.181
DocumentRoot /opt/openproject/public
ProxyRequests off
Include /etc/openproject/addons/apache2/includes/vhost/*.conf
IncludeOptional /etc/openproject/addons/apache2/custom/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>
I do have another config for MediaWiki with the following content:
<VirtualHost *:80>
ServerName 192.168.1.182
Alias /mediawiki "/var/www/html/mediawiki/"
<Directory /var/www/html/mediawiki>
AllowOverride All
Require all granted
</Directory>
RewriteEngine On
RewriteRule ^/*$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]
AllowEncodedSlashes NoDecode
</VirtualHost>
Here's my problem:
I currently have set both OpenProject and MediaWiki to listen to the IP address (ServerName is identical for both). I know this is wrong, but I don't know how to correct it.
I am not that familiar with apache2 configs since I mainly googled them together in the past and even today.
I want to direct OpenProject to [ip]/openproject and MediaWiki to [ip]/mediawiki. Can someone help me out with setting up my configs correctly?
I already tried to change the ServerName for OpenProject but then I cannot reach it anymore. I know that there are settings for this in the installer.dat to change these via configure, but I don't know what to type into these fields exactly. When removing/changing the ServerName from the OpenProject config I can access MediaWiki, but not OpenProject anymore. I reverted it for now, meaning that I can only access OpenProject but not MediaWiki.
Thanks a lot in advance if anyone can help me out with this! If I don't get an answer, I guess I have to set up MediaWiki in another smaller VM for now.
Best regards,
Philipp
Replies (1)
Hi all again,
good news! I figured out how to do it myself. Turns out that actually reading some documentation and watching videos that explain how apache2 configs are actually set up helps with understanding what I needed to do. If anyone else encounters this issue, here's how to do it:
Here's my new config that works just as I intended it to:
Anyways, thanks if anyone of you already began thinking about this. I figured it out on my own :)
Best regards,
Philipp