There is a small test project on django 2.0.4, in it is the standard wsgi.py and my own myapp.wsgi, in which I put the script from the standard example, namely

def application(environ, start_response): status = '200 OK' output = b'Hello World!' response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))] start_response(status, response_headers) return [output] 

To which firefox gives me the following:

Error in the content type The page you are trying to view cannot be displayed because it uses an incorrect or unsupported form of compression. Please contact the website owners and inform them about this issue.

There are suspicions that the problem is in the encodings, but the searches did not give anything, and error.log remains empty. You should make a reservation that I am trying to raise the server on Astra Linux SE 1.6. Tell me, please, what could be the reason for such a problem?

wsgi.py

 import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite1.settings") application = get_wsgi_application() 

apache2.conf

 ServerName example.com ServerRoot "/etc/apache2" PidFile ${APACHE_PID_FILE} Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 5 User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP} HostnameLookups Off ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn In# vim: syntax=apache ts=4 sw=4 sts=4 sr noetclude ports.conf <Directory /home/astra-admin/1/mysite1> <Files wsgi.py> Require all granted </Files> </Directory> <Directory /> Options FollowSymLinks AllowOverride None Require all denied </Directory> <Directory /usr/share> AllowOverride None Require all granted </Directory> <Directory /home/astra-admin/1/mysite1> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> WSGIScriptAlias /myapp /home/astra-admin/1/mysite1/myapp.wsgi <Directory /home/astra-admin/1/mysite1> <Files myapp.wsgi> Require all granted </Files> </Directory> <Directory /home/astra-admin/1/mysite1> <Files wsgi.py> AllowOverride None Require all granted </Files> </Directory> AccessFileName .htaccess <FilesMatch "^\.ht"> Require all denied </FilesMatch> LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent IncludeOptional conf-enabled/*.conf IncludeOptional sites-enabled/*.conf 
  • And show the site settings from Apache - andreymal
  • Well, this I can ... - irvis

0