[Bug 1586030] Re: Apache virtual hosts not working with suexec

Dimitri John Ledkov launchpad at surgut.co.uk
Tue May 31 10:53:11 UTC 2016

** Package changed: multipath-tools (Ubuntu) => apache2 (Ubuntu)

You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to multipath-tools in Ubuntu.

  Apache virtual hosts not working with suexec

Status in apache2 package in Ubuntu:

Bug description:
  I use a script to generate the config file to create a virtual host:

  # cat /etc/apache2/sites-enabled/mikemac.conf
  Listen 4506
  <VirtualHost ubuntu05.example.com:4506>
    ServerName ubuntu05.example.com
    DocumentRoot /srv/www/htdocs
    ErrorLog /var/log/apache2/mikemac-error_log
    CustomLog /var/log/apache2/mikemac-access_log combined
    HostnameLookups Off
    UseCanonicalName Off
    ServerSignature On
    SuExecUserGroup mikemac vmlinux
    ScriptAlias /cgi-bin/ /srv/www/vhosts/mikemac/cgi-bin/
    <Directory /srv/www/vhosts/mikemac/cgi-bin>
      AllowOverride None
      Options +ExecCGI -Includes
      Require all granted
    ScriptAlias /cgi-bin/ops/ /srv/www/vhosts/mikemac/cgi-bin/ops/
    <Directory /srv/www/vhosts/mikemac/cgi-bin/ops>
      AllowOverride None
      Options +ExecCGI -Includes
      AuthType Basic
      AuthName "zoom server operations"
      AuthUserFile /srv/www/cgi-bin/zoompasswd
      Require valid-user

  With the suexec installed, Apache comes up and is listening on port 4506. From a browser  
  I can go to http://ubuntu05.example.com and see the default index.html file. 
  But if I go to any script in either cgi-bin/ or cgi-bin/ops/ I get a 404 Not Found.

  I look at the files in /var/log/apache:
  # ls -latr
  total 24
  drwxr-xr-x 8 root syslog 4096 May 20 07:26 ../
  -rw-r----- 1 root adm    1303 May 20 11:36 access.log
  -rw-r--r-- 1 root root      0 May 20 11:52 mikemac-error_log
  -rw-r--r-- 1 root root      0 May 20 11:52 mikemac-access_log
  drwxr-x--- 2 root adm    4096 May 20 11:54 ./
  -rw-r----- 1 root adm    4518 May 20 11:54 error.log
  -rw-r--r-- 1 root root    191 May 20 11:55 other_vhosts_access.log

  What's curious is that the output is going to other_vhosts_access.log
  like it is not associating the request on port 4506 with the "mikemac"
  virtual host.

  I run the same script to generate a virtual host on SLES 12 SP1,
  restart Apache, and cgi-bin/ scripts work fine.

  Here is some other info:
  # lsb_release -rd
  Description:    Ubuntu 16.04 LTS
  Release:        16.04
  # apt list apache2
  Listing... Done
  apache2/xenial,now 2.4.18-2ubuntu3 s390x [installed]

To manage notifications about this bug go to:

More information about the foundations-bugs mailing list