404 on WSGIScriptAlias

Issues related to applications and software problems
Post Reply
DK907
Posts: 71
Joined: 2011/11/21 16:32:49

404 on WSGIScriptAlias

Post by DK907 » 2020/09/02 16:39:09

I am trying to run /srv/vhost2.example.com/scripts/hello_world.py at http://vhost2.example.com/webapp/hello_world.py, but I am getting the 404 error.
I have this in /etc/httpd/conf.d/vhost2.example.com.

Code: Select all

<Directory /srv/vhost2.example.com/www>
Require all granted
</Directory>
<Directory /srv/vhost2.example.com/scripts>
Require all granted
</Directory>
<VirtualHost *:80>
ServerName vhost2.example.com
DocumentRoot /srv/vhost2.example.com/www
WSGIScriptAlias /webapp/ /srv/vhost2.example.com/scripts/hello_world.py
</VirtualHost>
I can access index.html in /srv/vhost2.example.com/www at http://vhost2.example.com and my script has the httpd_sys_script_exec_t SELinux context, so I cannot think of anything else to try to get this to work.

DK907
Posts: 71
Joined: 2011/11/21 16:32:49

Re: 404 on WSGIScriptAlias

Post by DK907 » 2020/09/03 17:05:39

DK907 wrote:
2020/09/02 16:39:09
I am trying to run /srv/vhost2.example.com/scripts/hello_world.py at http://vhost2.example.com/webapp/hello_world.py, but I am getting the 404 error.
I have this in /etc/httpd/conf.d/vhost2.example.com.conf

Code: Select all

<Directory /srv/vhost2.example.com/www>
Require all granted
</Directory>
<Directory /srv/vhost2.example.com/scripts>
Require all granted
</Directory>
<VirtualHost *:80>
ServerName vhost2.example.com
DocumentRoot /srv/vhost2.example.com/www
WSGIScriptAlias /webapp/ /srv/vhost2.example.com/scripts/hello_world.py
</VirtualHost>
I can access index.html in /srv/vhost2.example.com/www at http://vhost2.example.com and my script has the httpd_sys_script_exec_t SELinux context, so I cannot think of anything else to try to get this to work.

DK907
Posts: 71
Joined: 2011/11/21 16:32:49

Re: 404 on WSGIScriptAlias

Post by DK907 » 2020/09/03 17:06:03

I am trying to run /srv/vhost2.example.com/scripts/hello_world.py at http://vhost2.example.com/webapp/hello_world.py, but I am getting the 404 error.
I have this in /etc/httpd/conf.d/vhost2.example.com.conf.

Code: Select all

<Directory /srv/vhost2.example.com/www>
Require all granted
</Directory>
<Directory /srv/vhost2.example.com/scripts>
Require all granted
</Directory>
<VirtualHost *:80>
ServerName vhost2.example.com
DocumentRoot /srv/vhost2.example.com/www
WSGIScriptAlias /webapp/ /srv/vhost2.example.com/scripts/hello_world.py
</VirtualHost>
I can access index.html in /srv/vhost2.example.com/www at http://vhost2.example.com and my script has the httpd_sys_script_exec_t SELinux context, so I cannot think of anything else to try to get this to work.

DK907
Posts: 71
Joined: 2011/11/21 16:32:49

Re: 404 on WSGIScriptAlias

Post by DK907 » 2020/09/03 17:07:30

Sorry, I meant /etc/httpd/conf.d/vhost2.example.com.conf. I doubt I am going to get any help on this problem beyond being told to RTFM, but I thought it was worth a try.

Post Reply

Return to “CentOS 7 - Software Support”