Remove APP_SUBDIR token from python-path in templates
The extra subdirectory caused problems, at least for Django
The expected layout is now:
docroot
  - app_subdir
    - wsgi.py
It ispossible for app_subdir to be empty in cases where it is not needed.
			
			
This commit is contained in:
		
							parent
							
								
									f47a2ae0c4
								
							
						
					
					
						commit
						3ffd68027c
					
				|  | @ -10,12 +10,12 @@ | |||
|   %%CHAINLINE%% | ||||
| 
 | ||||
|   <IfModule mod_wsgi.c> | ||||
|     WSGIDaemonProcess %%fqdn%% python-home=%%VENV%% python-path=%%document_root%%/%%APP_SUBDIR%%/ socket-user=#%%UID%% | ||||
|     WSGIDaemonProcess %%fqdn%% python-home=%%VENV%% python-path=%%document_root%%/ socket-user=#%%UID%% | ||||
|     WSGIProcessGroup %%fqdn%% | ||||
|     WSGIScriptAlias / %%document_root%%/%%APP_SUBDIR%%/wsgi.py process-group=%%fqdn%% | ||||
|   </IfModule> | ||||
| 
 | ||||
|   <Directory "%%document_root%%/%%APP_SUBDIR%%"> | ||||
|   <Directory "%%document_root%%/%%APP_SUBDIR%%/"> | ||||
|     AllowOverride All | ||||
|     <Files wsgi.py> | ||||
|       <IfVersion < 2.4> | ||||
|  | @ -35,12 +35,12 @@ | |||
|   SetEnv LOGIN "%%UID%%-%%LOGIN%%" | ||||
| 
 | ||||
|   <IfModule mod_wsgi.c> | ||||
|     WSGIDaemonProcess %%fqdn%% python-home=%%VENV%% python-path=%%document_root%%/%%APP_SUBDIR%%/ socket-user=#%%UID%% | ||||
|     WSGIDaemonProcess %%fqdn%% python-home=%%VENV%% python-path=%%document_root%%/ socket-user=#%%UID%% | ||||
|     WSGIProcessGroup %%fqdn%% | ||||
|     WSGIScriptAlias / %%document_root%%/%%APP_SUBDIR%%/wsgi.py process-group=%%fqdn%% | ||||
|   </IfModule> | ||||
| 
 | ||||
|   <Directory "%%document_root%%/%%APP_SUBDIR%%"> | ||||
|   <Directory "%%document_root%%/%%APP_SUBDIR%%/"> | ||||
|     AllowOverride All | ||||
|     <Files wsgi.py> | ||||
|       <IfVersion < 2.4> | ||||
|  |  | |||
|  | @ -22,12 +22,12 @@ | |||
|   AssignUserId #%%UID%% #%%GID%% | ||||
|   SetEnv LOGIN "%%UID%%-%%LOGIN%%" | ||||
|   <IfModule mod_wsgi.c> | ||||
|     WSGIDaemonProcess %%fqdn%% python-home=%%VENV%% python-path=%%document_root%%/%%APP_SUBDIR%%/ socket-user=#%%UID%% | ||||
|     WSGIDaemonProcess %%fqdn%% python-home=%%VENV%% python-path=%%document_root%%/ socket-user=#%%UID%% | ||||
|     WSGIProcessGroup %%fqdn%% | ||||
|     WSGIScriptAlias / %%document_root%%/%%APP_SUBDIR%%/wsgi.py process-group=%%fqdn%% | ||||
|   </IfModule> | ||||
| 
 | ||||
|   <Directory "%%document_root%%/%%APP_SUBDIR%%"> | ||||
|   <Directory "%%document_root%%/%%APP_SUBDIR%%/"> | ||||
|     AllowOverride All | ||||
|     <Files wsgi.py> | ||||
|       <IfVersion < 2.4> | ||||
|  |  | |||
|  | @ -10,12 +10,12 @@ | |||
|   %%CHAINLINE%% | ||||
| 
 | ||||
|   <IfModule mod_wsgi.c> | ||||
|     WSGIDaemonProcess %%fqdn%% python-home=%%VENV%% python-path=%%document_root%%/%%APP_SUBDIR%%/ socket-user=#%%UID%% | ||||
|     WSGIDaemonProcess %%fqdn%% python-home=%%VENV%% python-path=%%document_root%%/ socket-user=#%%UID%% | ||||
|     WSGIProcessGroup %%fqdn%% | ||||
|     WSGIScriptAlias / %%document_root%%/%%APP_SUBDIR%%/wsgi.py process-group=%%fqdn%% | ||||
|   </IfModule> | ||||
| 
 | ||||
|   <Directory "%%document_root%%/%%APP_SUBDIR%%"> | ||||
|   <Directory "%%document_root%%/%%APP_SUBDIR%%/"> | ||||
|     AllowOverride All | ||||
|     <Files wsgi.py> | ||||
|       <IfVersion < 2.4> | ||||
|  |  | |||
|  | @ -0,0 +1,42 @@ | |||
| <Virtualhost *:443> | ||||
|   ServerName %%fqdn%% | ||||
|   AssignUserId #%%UID%% #%%GID%% | ||||
|   SetEnv LOGIN "%%UID%%-%%LOGIN%%" | ||||
| 
 | ||||
|   SSLEngine On | ||||
|   SSLCertificateFile %%CRT%% | ||||
|   SSLCertificateKeyFile %%KEY%% | ||||
|   %%CHAINLINE%% | ||||
| 
 | ||||
|   KeepAlive Off | ||||
| 
 | ||||
|   RewriteEngine On | ||||
|   RewriteCond %{REQUEST_FILENAME} !/cgi-bin/ | ||||
|   RewriteCond %{REQUEST_FILENAME} !/.well-known/acme-challenge/ | ||||
|   RewriteRule ^/(.*)$ http://%%fqdn%%/$1 [R=301,L] | ||||
| </Virtualhost> | ||||
| 
 | ||||
| <VirtualHost *:80> | ||||
|   ServerName %%fqdn%% | ||||
|   DocumentRoot %%document_root%% | ||||
|   AssignUserId #%%UID%% #%%GID%% | ||||
|   SetEnv LOGIN "%%UID%%-%%LOGIN%%" | ||||
|   <IfModule mod_wsgi.c> | ||||
|     WSGIDaemonProcess %%fqdn%% python-home=%%VENV%% python-path=%%document_root%%/ socket-user=#%%UID%% | ||||
|     WSGIProcessGroup %%fqdn%% | ||||
|     WSGIScriptAlias / %%document_root%%/%%APP_SUBDIR%%/wsgi.py process-group=%%fqdn%% | ||||
|   </IfModule> | ||||
| 
 | ||||
|   <Directory "%%document_root%%/%%APP_SUBDIR%%/"> | ||||
|     AllowOverride All | ||||
|     <Files wsgi.py> | ||||
|       <IfVersion < 2.4> | ||||
|         Order allow,deny | ||||
|         Allow from all | ||||
|       </IfVersion> | ||||
|       <IfVersion >= 2.4> | ||||
|         Require all granted | ||||
|       </IfVersion> | ||||
|     </Files> | ||||
|   </Directory> | ||||
| </VirtualHost> | ||||
		Loading…
	
		Reference in New Issue