VPS Ubuntu 14.04LTS apache2.4 python cgi

nitin chandra nitinchandra1 at gmail.com
Sat Apr 30 19:32:33 UTC 2016


Hi All,

Usually I would configure one VH (default one) and use that for
development / hosting my web based application, apache2 with
python+cgi.

Now I need to configure multiple VH on VPS. I also need to give access
to some developers across the city. They will log-in via ssh into that
user directory.

This Project / work directory where all html/cgi (python) scripts will
be - passtms directory.

I am getting a 403 Forbidden error on the browser. And I have been
trying to overcome this issue for the last one week. Project is also
getting delayed.

Please help me out in
1. configuring this VH (so that I can copy paste and create other later).

Thank you in Advance

Nitin

--------------------------------------------------

in /etc/apache2/apache.conf (changed section)

<Directory /home/*/public_html/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

------------------------------------

Modules Loaded

Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 cgid_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 fcgid_module (shared)
 filter_module (shared)
 mime_module (shared)
 mpm_event_module (shared)
 negotiation_module (shared)
 setenvif_module (shared)
 status_module (shared)
 userdir_module (shared)
 wsgi_module (shared)

----------------------------------------------------------

in /etc/hosts

13x.2xx.91.2xx passtms.in
13x.2xx.91.2xx www.passtms.in

-------------------------------------------------------
 /etc/apache2/site-enabled/passtms.in.conf


<VirtualHost 13x.2xx.91.2xx:80>
  # Admin email, Server Name (domain name) and any aliases
  #ServerAdmin webmaster at domain1.com

  ServerName  passtms.in
  ServerAlias www.passtms.in

  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html
  DocumentRoot /home/vimal/public_html/

  ScriptAlias "/cgi-bin/" "/home/vimal/public_html/"

  <Directory "home/vimal/public_html/">
        Options +ExecCGI +Indexes +FollowSymLinks
        AddHandler cgi-script .cgi .py
        AllowOverride All
        Order allow,deny
        Allow from all
  </Directory>

  # Custom log file locations
  LogLevel warn
  ErrorLog /home/vimal/public_html/passtms/log/error-passtms.com.log
  CustomLog /home/vimal/public_html/passtms/log/access-passtms.com.log combined

</VirtualHost>

------------------------------------------
 File permissions set are as follows

# chmod 711 /home

# chmod 711 /home/vimal/public_html

# chmod 755 -R ~./passtms

----------------------------------------------------
ERROR log of apache


[Sun May 01 00:05:51.037436 2016] [authz_core:error] [pid 18140:tid
139852223723264] [client 146.196.33.60:6827] AH01630: client denied by
server configuration: /var/www/
[Sun May 01 00:05:51.203155 2016] [authz_core:error] [pid 18140:tid
139852215330560] [client 146.196.33.60:6827] AH01630: client denied by
server configuration: /var/www/favicon.ico, referer:
http://13x.2xx.91.2xx/
[Sun May 01 00:05:53.125884 2016] [authz_core:error] [pid 18140:tid
139852206937856] [client 146.196.33.60:6827] AH01630: client denied by
server configuration: /var/www/
[Sun May 01 00:05:53.291734 2016] [authz_core:error] [pid 18140:tid
139852198536960] [client 146.196.33.60:6827] AH01630: client denied by
server configuration: /var/www/favicon.ico, referer:
http://13x.2xx.91.2xx/
[Sun May 01 00:06:02.091247 2016] [authz_core:error] [pid 18142:tid
139852206937856] [client 146.196.33.60:6827] AH01630: client denied by
server configuration: /var/www/public_html
[Sun May 01 00:06:02.254679 2016] [authz_core:error] [pid 18142:tid
139852215330560] [client 146.196.33.60:6827] AH01630: client denied by
server configuration: /var/www/favicon.ico, referer:
http://13x.2xx.91.2xx/public_html
[Sun May 01 00:06:14.371077 2016] [authz_core:error] [pid 18142:tid
139852062361344] [client 146.196.33.60:6827] AH01630: client denied by
server configuration: /var/www/vimal
[Sun May 01 00:06:14.533642 2016] [authz_core:error] [pid 18142:tid
139852053968640] [client 146.196.33.60:6827] AH01630: client denied by
server configuration: /var/www/favicon.ico, referer:
http://13x.2xx.91.2xx/vimal/public_html
[Sun May 01 00:06:17.828644 2016] [authz_core:error] [pid 18142:tid
139852045575936] [client 146.196.33.60:6827] AH01630: client denied by
server configuration: /var/www/vimal
[Sun May 01 00:06:17.986809 2016] [authz_core:error] [pid 18142:tid
139852037183232] [client 146.196.33.60:6827] AH01630: client denied by
server configuration: /var/www/favicon.ico, referer:
http://13x.2xx.91.2xx/vimal/public_html/
[Sun May 01 00:14:41.861797 2016] [cgi:error] [pid 18142:tid
139852028790528] [client 115.231.222.14:4678] script not found or
unable to stat: /usr/lib/cgi-bin/common




More information about the ubuntu-users mailing list