404 on WSGIScriptAlias on CentOS 7
by DK907 from LinuxQuestions.org on (#57QRE)
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:<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.


I have this in /etc/httpd/conf.d/vhost2.example.com.conf.
Code:<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.