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. Does Apache2 Configuration Affect Existing Virtual Hosts?

Does Apache2 Configuration Affect Existing Virtual Hosts?

Added by Robert Ferry over 5 years ago

Hello,

I have installed and would like to configure OpenProject on a server that already hosts a robust set of websites and web applications. We have 6 domains and subdomains operating from within this Ubuntu 18.04 Apache2 environment, running multiple Wordpress sites (MySQL) and one Python-based Django web application (PostgreSQL).

When I got to the configuration wizard I got scared. I'm not familiar enough with what it will be doing behind the scenes when I accept the automatic options for setting up the database and the Apache2 web server. I'd love to just click through the portgres autoinstall and the apache autoinstall options, but I'm afraid of what it might do to my existing set up and I really don't want to break all of my websites.

I have already set up a new subdomain, established A records, and a virtual host file. A "hello world" index.html is up and running (actually just a meta tag redirect for now), and the subdomain is SSL certified with LetsEncrypt.

So my question to the forum is simply should I go ahead and click through the configuration or am I right to be concerned?

If it's the latter, and it is best to hit "skip" on the Apache2 autoinstall, what steps can I take to manually set that up? I follow the path in the instructions for "installing with an existing Apache2," which leads to this github repository: https://github.com/pkgr/addon-apache2/tree/master/conf but I'm not sure what to do with that information and it's all 4 years old, which also give me pause.

Thanks for any assistance!


Replies (7)

RE: Does Apache2 Configuration Affect Existing Virtual Hosts? - Added by Robert Ferry over 5 years ago

Can anyone offer a yes or no answer to the question of whether the auto-configuration wizard will cause an issue with existing Apache2 configurations on the same server? Thanks!

RE: Does Apache2 Configuration Affect Existing Virtual Hosts? - Added by stefano marty over 5 years ago

I installed my first OpenProject instance last year, think it was v.8. I don't remember if there was, and I used, an autoinstall wizard. I think I didn't, knowing myself. I cannot tell you if this wizard will cause any issue with the existing confs, but my present configuration runs on Debian 8 + Apache2 and I think you can easily bypass the auto-wizard. Just install a .conf file for your new subdomain. Here's mine:

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

<VirtualHost *:80>
  ServerName openproject.[REDACTED].com
  RewriteEngine On
  RewriteRule ^/?(.*) https://%{SERVER_NAME}:443/$1 [R,L]
</VirtualHost>

<VirtualHost *:443>
  ServerName openproject.[REDACTED].com
  DocumentRoot /home/openproject/public

  ProxyRequests off

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

  ProxyPass / http://127.0.0.1:6000/ retry=0
  ProxyPassReverse / http://127.0.0.1:6000/
</VirtualHost>

Remember check your document root path, mine could be different than yours.

Best.

RE: Does Apache2 Configuration Affect Existing Virtual Hosts? - Added by Oliver Günther over 5 years ago

Hi guys,

the packaged installations lacks a mode where it detects an existing apache and will output a configuration that you can enable on your own terms / in your own virtualhost.

Currently you either skip apache setup and do it entirely yourself, or you need to let the wizard configure it for you. It should co-exist with other virtualhosts if you're not letting it run under the main domain but a subdomain e.g. in any case

Best,

Oliver

RE: Does Apache2 Configuration Affect Existing Virtual Hosts? - Added by Robert Ferry over 5 years ago

Thank you Stefano. 

I completed the configuration, successfully connected to a unique postgresql database and user. I still haven't figured out how to get OpenProject to run on my subdomain. I'm on Ubuntu 18 so my virtual host file is slightly different. The version below is what I have now. It resolves to a standard index.html sitting in the public web folder of the domain.

It looks based on your example that I need to add a listener on port 443? 

# domain: openproject.[REDACTED].org

# public: /[REDACTED]/[REDACTED]/openproject.[REDACTED].org/

<VirtualHost *:80>

  # Admin email, Server Name (domain name), and any aliases

ServerAdmin [REDACTED]@[REDACTED].org

ServerName  openproject.[REDACTED].org

ServerAlias www.openproject.[REDACTED].org

  # Index file and Document Root

DirectoryIndex index.html index.php

DocumentRoot /[REDACTED]/[REDACTED]/projects.[REDACTED].org/

  # Log file locations

  LogLevel warn

  ErrorLog /[REDACTED]/[REDACTED]/openproject.[REDACTED].org/log/error.log

  CustomLog /[REDACTED]/[REDACTED]/openproject.[REDACTED].org/log/access.log combined

</VirtualHost>

RE: Does Apache2 Configuration Affect Existing Virtual Hosts? - Added by Robert Ferry over 5 years ago

Thank you Oliver.

What you are saying is that I could have allowed the wizard to set up Apache2 and it would not have conflicted with any of my other virtual hosts because I'm running it on a subdomain? I thought there was a chance this was the case, but it was too risky to try! Now that I've completed the configuration with everything but the hosting, I'm hoping I can get feedback from the forum community on exactly how my new virtual host file should look. Getting it wrong will cause Apache2 restart to fail and bring down all of our websites. 

Thanks again!

RE: Does Apache2 Configuration Affect Existing Virtual Hosts? - Added by stefano marty over 5 years ago

You need to configure the ProxyPass directive in your apache conf file, without it the Apache server is simply sending you the index.html file in the DocumentRoot folder.

When the OpenProject server is running, it listens on localhost on port 6000 (unless you change the standard configuration). So you need to tell Apache to "pass" all the requests received for that virtual host to the correct address:port, and this is made by using the ProxyPass directive. So you need to add to your conf file this directives (assuming your OpenProject server is running on the standard localhost:6000):

  ProxyRequests off

  ProxyPass / http://127.0.0.1:6000/ retry=0
  ProxyPassReverse / http://127.0.0.1:6000/

Note that ProxyRequests is off by default, but there's no harm in setting it off again (better sure than sorry :)

As for the HTTPS question, it depends on what level of security you need. As I'm controlling the server where OpenProject runs, I don't feel the need to use SSL between Apache and OpenProject, so I leave the ProxyPass on http.

On the other hand, all my websites are accessible through HTTPS only, so I redirect all the incoming traffic on port 80 to port 443 (see rewrite rule in the <VirtualHost *:80> ) and then handle the traffic to the OpenProject server in the <VirtualHost *:443> with the ProxyPass directive.

Something like this:

OpenProject Server			Apache Server				Browser

localhost:6000	<-http->		ProxyPass		<-https->	User	

RE: Does Apache2 Configuration Affect Existing Virtual Hosts? - Added by Robert Ferry over 5 years ago

Thanks Stefano!

ProxyPass was exactly what I was looking for! It's working.

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