Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. OpenProject and other services via apache2

OpenProject and other services via apache2

Added by Philipp Schulz over 1 year 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)

RE: OpenProject and other services via apache2 - Added by Philipp Schulz over 1 year ago

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:

  1. When trying to host several services under a single domain, only one virtual host with the alias of that specific domain needs to be set up. 
  2. A single service is chosen to be directly available at the domain root.
  3. All other services are chosen as an "Alias" that points to a different directory.
  4. Each directory is then handled individually via a "<Directory>" block.

Here's my new config that works just as I intended it to:

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
	Alias /mediawiki /var/www/html/mediawiki

	# config for openproject
	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
        ProxyRequests off
        ProxyPass /openproject/ http://127.0.0.1:6000/openproject/ retry=0
        ProxyPassReverse /openproject/ http://127.0.0.1:6000/openproject/

	# config for mediawiki
	AllowEncodedSlashes NoDecode
	<Directory /var/www/html/mediawiki>
		AllowOverride All
		Require all granted
		RewriteEngine On
		RewriteRule ^/*$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]
	</Directory>
</VirtualHost>

Anyways, thanks if anyone of you already began thinking about this. I figured it out on my own :)

Best regards,

Philipp

  • (1 - 1/1)
Loading...