<VirtualHost *:80>
ServerName mysite.ru
ServerAlias www.mysite.ru
DocumentRoot "mysite"
ProxyRequests Off
ProxyPreserveHost On
ProxyVia full
ProxyPass / http://192.168.1.4:80/
ProxyPassReverse / http://192.168.1.4:80/
</VirtualHost>
<VirtualHost *:80>
ServerName mysite.ru
ServerAlias www.mysite.ru
DocumentRoot "mysite"
ProxyRequests Off
ProxyPreserveHost On
ProxyVia full
ProxyPass / http://192.168.1.4/
ProxyPassReverse / http://192.168.1.4/
</VirtualHost>
Апач стартует, ошибок нет. Но сайт пока попрежнему доступен по домену с портом 8080. Какие теперь настройки нужно сделать на машине 192.168.1.4 в nginx ?
Сейчас у меня так.
<code lang="nginx">
upstream shop {
# connect to this socket
server unix:///tmp/mysite.sock; # for a file socket
# server 127.0.0.1:8001; # for a web port socket
}
server {
# the port your site will be served on
listen 8080;
# the domain name it will serve for
server_name mysite.ru www.mysite.ru; # substitute your machine's IP address or FQDN
charset utf-8;
#Max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
alias /home/blazer/mysite/media; # your Django project's media files
}
location /static {
alias /home/blazer/mysite/static; # your Django project's static files
}
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass shop;
include /etc/nginx/uwsgi_params; # or the uwsgi_params you installed manually
}
}
</code>