Open link in a new tab

Content

Expand project menu

Avoid Virtualhost in Apache

I followed this great article for installation of OpenProject.

It actually works, but I’d like to avoid the use of Virtualhost in the http openproject.conf file because it spoils functionality of other web-bases installations.

Can I do that? My first guess was (and I am no Apache expert) to use alias instead of Virtualhost, i.e.:

—

  1. <VirtualHost *:80>
  2. ServerName mtdk
  3. DocumentRoot /home/openproject/openproject/public
    Alias /openproj /home/openproject/openproject/public
    <Directory /home/openproject/openproject/public>
    # This relaxes Apache security settings.
    AllowOverride all
    # MultiViews must be turned off.
    Options -MultiViews
  4. —

But when accessing <my_server_ip>/openproj in the browser it claims:
—
You don’t have permission to access /openproj/ on this server.
—

Any suggestions?

Best regards,
Kenneth

Message actions

Hi Kenneth
I think you should put permissions inside directory container and remove documentRoot information like this

<VirtualHost *:80>  
    Alias /openproj /home/openproject/openproject/public
    <Directory /home/openproject/openproject/public> # This relaxes Apache security settings.
        AllowOverride all # MultiViews must be turned off.
        Options -MultiViews
        Order Allow,Deny # <------------------
        Allow from all   # <------------------
    </Directory>
</VirtualHost>

And make sure that apache user have access permission on the directory /home/openproject/openproject/public

chmod o+rx /home/openproject/openproject/public

By the way it’s sufficient if you have this in your config file

Alias /openproj /home/openproject/openproject/public
    <Directory /home/openproject/openproject/public> # This relaxes Apache security settings.
        AllowOverride all # MultiViews must be turned off.
        Options -MultiViews
        Order Allow,Deny 
        Allow from all   
    </Directory>

/Because the following two lines mean that you can access /home/openproject/openproject/public by typing in your browser http://mtdk/

ServerName mtdk
DocumentRoot /home/openproject/openproject/public

let me know if it worked for you and sorry for my poor english

Maïssa