Events

Reports

Links

Latest forum posts

           
      AU-KBC
RESEARCH CENTRE

Nginx configuration

virtual hosts in nginx in fedora

Posted by: lawgon

Dated: Thu 29 Oct 2009

  • 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


Posted by: lawgon

Dated: Tue 03 Nov 2009

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/;
    }

}




Please login or register if you wish to post in this forum