Hello,
after reading a lot about creating virtual hosts with apache I've done this in my httpd.conf
:
ServerRoot /home/[USER]/webapps/apache/apache2
LoadModule alias_module modules/mod_alias.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule wsgi_module modules/mod_wsgi.so
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /home/[USER]/logs/user/access_apache.log combined
# fall back to this directory if the directory defined via
# WSGIScriptAlias is not accessible
DocumentRoot /home/[USER]/webapps/apache/htdocs
DirectoryIndex index.py
ErrorLog /home/[USER]/logs/user/error_apache.log
KeepAlive Off
MaxSpareThreads 3
MinSpareThreads 1
ServerLimit 1
SetEnvIf X-Forwarded-SSL on HTTPS=1
ThreadsPerChild 5
WSGIDaemonProcess apache processes=2 python-home=/home/[USER]/webapps/apache/lib/python2.7 threads=1
WSGIProcessGroup apache
WSGIRestrictEmbedded On
WSGILazyInitialization On
Listen 29644
NameVirtualHost *:29644
<VirtualHost *:29644>
ServerName mutetella.org
Alias / /home/[USER]/webapps/static/index.html
<Directory /home/[USER]/webapps/static>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:29644>
ServerName mutetella.org
Alias /htdocs /home/[USER]/webapps/trac/.htdocs
<Directory /home/[USER]/webapps/trac/.htdocs>
Order allow,deny
Allow from all
</Directory>
WSGIDaemonProcess trac processes=2 threads=15
WSGIScriptAlias /trac /home/[USER]/webapps/trac/.cgi-bin/trac.wsgi
<Directory /home/[USER]/webapps/trac/.cgi-bin>
WSGIProcessGroup trac
WSGIApplicationGroup %{GLOBAL}
Order allow,deny
Allow from all
</Directory>
<LocationMatch "/[^/]+/login">
AuthType Digest
AuthName "trac"
AuthDigestDomain /
AuthUserFile /home/[USER]/webapps/trac/.htpasswd
Require valid-user
</LocationMatch>
</VirtualHost>
# show ``index.py`` as wsgi script if no other app/script is defined above
# the name ``index.py`` is defined via ``DirectoryIndex`` above
<Directory /home/[USER]/webapps/apache/htdocs>
AddHandler wsgi-script .py
</Directory>
Invoke 'mutetella.org' will process the /home/[USER]/webapps/static/index.html
as expected. But calling 'mutetella.org/trac' causes in a '404 Not Found Error' and the error log says 'File does not exist: /home/[USER]/webapps/static/index.htmltrac'
What am I doing wrong?
EDIT Within my webfaction configuration I've linked 'apache (mod_wsgi 4.2.8/Python 2.7)'' with the domains 'mutetella.org' and 'www.mutetella.org' each on path /
.
asked
19 Jan '15, 13:11
mutetella
23●2●5●8
accept rate:
0%