It is still showing the code of "index.py" file.
If I set DocumentRoot / --> it gives a 403 error.
-------------------------------------------------------------
my /etc/hosts file is set as follows :
nitin@nitin:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 nitin
127.0.1.1 www.healthcare.in
127.0.1.1 healthcare.in
------------------------------------------------------------
apache 000-default.conf file:
<VirtualHost 127.0.0.1:80>
DocumentRoot /home/nitin/wsgi-scripts
<Directory /home/nitin/wsgi-scripts>
#Options +Indexes +FollowSymLinks +MultiViews +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
DirectoryIndex index.html index.wsgi index.py
</IfModule>
ServerName www.healthcare.in
ServerAlias healthcare.in
WSGIDaemonProcess healthcare.in processes=6 threads=15 display-name=%{GROUP}
WSGIProcessGroup healthcare.in
WSGIScriptAlias / /home/nitin/wsgi-scripts/index.py
<Directory /home/nitin/wsgi-scripts>
Order allow,deny
Allow from all
</Directory>
ServerAdmin webmaster@localhost
#DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
On 22 January 2015 at 03:57, Graham Dumpleton
<[email protected]> wrote:
>
>> I just want to server my site from /wsgi-scripts/index.py from ONLY one URL.
>>
>> / --> /home/nitin/wsgi-scripts/
>
> Your second line here doesn't really match the explanation of the first.
>
> If that is all you want is for the WSGI application contained in the index.py
> file to be available at the root of the web site, then all you need is:
>
> <VirtualHost 127.0.1.1:80>
> ServerName www.healthcare.in
> ServerAlias healthcare.in
> WSGIDaemonProcess healthcare.in processes=6 threads=15 display-name=%{GROUP}
> WSGIProcessGroup healthcare.in
> WSGIScriptAlias / /home/nitin/wsgi-scripts/index.py
> <Directory /home/nitin/wsgi-scripts>
> Order allow,deny
> Allow from all
> </Directory>
> ServerAdmin webmaster@localhost
> #DocumentRoot /var/www/html
>
> ErrorLog ${APACHE_LOG_DIR}/error.log
> CustomLog ${APACHE_LOG_DIR}/access.log combined
>
> </VirtualHost>
>
> Note, DO NOT set DocumentRoot to where your source code files are. Allow it
> to default to the empty DocumentRoot directory for the whole server, or if
> there is stuff in that you do not want exposed, then create a new empty
> directory with nothing in it, and set DocumentRoot to refer to is.
>
> Graham
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.