Nginx configuration
virtual hosts in nginx in fedora
- set up nginx and uncomment the line importing conf.d/virtual.conf
- edit /etc/nginx/virtual.conf and add port (80) and server name
- uncomment the 'server' part fully
- if you want, add a logfile for your virtual host
- create a directory such as '/var/www/myvirtualhost/ and add that as root under 'location /'
- add an index.html file in the document root
- restart nginx - service nginx restart
- if your dns is pointing correctly, you can access the virtual host over the web
simple virtual host configuration file:
server {
listen 80;
server_name ilugc.web;
location / {
proxy_pass http://127.0.0.1:8888;
}
location /sitemedia/ {
root /home/lawgon/ilugc/;
}
location /smedia/ {
root /home/lawgon/;
}
location /media/ {
root /home/lawgon/django-trunk/django/contrib/admin/;
}
}


