Hello. There is a VPS on nginx + apache (+ ispmanager)

There is a site django + oscar.

I upload the site archive to the place where the domain is pointing, I execute the commands make libs make install servise

But the domain simply opens the contents of this folder http://aleol.ru/

To do this, get a makefile

.PHONY: libs install start stop NAME = chem CTX = prod PORT = 805 DOMAIN = 5.45.121.227 DJANGO_SETTINGS_MODULE = $(NAME).settings.$(CTX) export DJANGO_SETTINGS_MODULE libs: aptitude -y install python-pip python-dev build-essential python-virtualenv libjpeg-dev daemon nginx uwsgi uwsgi-plugin-python git libmysqlclient-dev virtualenv oscar oscar/bin/pip install django-oscar==1.1.1 pysolr simplejson xlrd MySQL- python oscar/bin/pip uninstall -y Pillow oscar/bin/pip install Pillow rm -rf solr-4.7.2 wget -q http://archive.apache.org/dist/lucene/solr/4.7.2/solr-4.7.2.tgz -O solr-4.7.2.tgz tar xzf solr-4.7.2.tgz mv solr-4.7.2/example/solr/collection1/conf solr-4.7.2/example/solr/collection1/conf.original mkdir solr-4.7.2/example/solr/collection1/conf cp -rp solr.conf/* solr-4.7.2/example/solr/collection1/conf install: python confgen.py $(NAME) $(CTX) $(DOMAIN) $(PORT) rm -rf /etc/nginx/sites-enabled/$(NAME)_nginx.conf rm -rf /etc/uwsgi/apps-enabled/$(NAME)_uwsgi.ini ln -s $(shell pwd)/$(NAME)_nginx.conf /etc/nginx/sites-enabled/ ln -s $(shell pwd)/$(NAME)_uwsgi.ini /etc/uwsgi/apps-enabled/ chmod 744 solr.run chown -R www-data pid chgrp -R www-data pid chown -R www-data logs chgrp -R www-data logs chown -R www-data $(NAME)/public chgrp -R www-data $(NAME)/public oscar/bin/python $(NAME)/manage.py migrate oscar/bin/python $(NAME)/manage.py loaddata init oscar/bin/python $(NAME)/manage.py loaddata flatpage oscar/bin/python $(NAME)/manage.py loaddata offer oscar/bin/python $(NAME)/manage.py collectstatic --noinput chown -R www-data $(NAME)/public chgrp -R www-data $(NAME)/public static: oscar/bin/python $(NAME)/manage.py collectstatic --noinput start: ./solr.run start service uwsgi restart stop: service uwsgi stop ./solr.run stop 

and in the configuration file ALLOWED_HOSTS = ['.aleol.ru', '5.45.121.227']

Tell me how to bind the domain to the site Django? Where to dig?

Closed due to the fact that it was off topic by aleksandr barakin , cheops , user194374, Streletz , fori1ton Jul 5 '16 at 6:52 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - aleksandr barakin, cheops, community spirit, Streletz, fori1ton
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • if you specify DOMAIN = aleol.ru in make file, the situation will not change. - Mikhail Sosnin
  • All right Because you have a standard port for connection - the 80th. And for django you indicated 805. If you open the site as aleol.ru:805 then everything is OK. But this is most likely wrong. Therefore, you need to configure nginx so that it takes on the site aleol.ru and redirects the request for django. At the same time, the site on django is BETTER to make available only from localhost. And here the Apache - I did not understand .... - gecube
  • I wrote about the Apache, for completeness, I am not strong in this, I wrote what I know) Thanks for the answer, it became a little clearer. But I don’t understand how to do it yet. Is it better to specify the 80th port? and how to make "redirect request for django."? - Mikhail Sosnin
  • if I specify the 80th port through the makefile and execute it, then the site becomes unavailable through ip or through the domain - Mikhail Sosnin
  • That's right, because port 80 is occupied by nginx and apache .... - gecube

1 answer 1

In general, I do not know if this can be considered an answer, but those helped me. support

"The fact is that aleol.ru has already created a configuration in the main nginx.conf file, so instead of adding additional configuration, it makes sense to correct the existing one. We transferred your configuration from the file ..."