Welcome! Log In Create A New Profile

Advanced

Several basic questions

Posted by pgeorge 
Several basic questions
April 16, 2012 08:52AM
Hello,

I am trying to move from apache2 to nginx and I have several questions that still puzzels me.

1. I have installed 1.0.14 version and I can't seem to find sites-available and sites-enabled folders. Is there a problem with my installation ? I first had installed 0.8.xxx version. I removed that and installed 1.0.14. Should that be a reason for missing folders ?

2. Where should I place rewrite rules ? I put them directly under server. Is this correct ?

3. My site index was specified in apache like this:

DirectoryIndex some_page.php?option=all

How can I do that with nginx ?

Thanks all.
Re: Several basic questions
April 25, 2012 06:45AM
1. What os do you have ? if you had a sites-available, that sounds debian/ubuntu to me. After an upgrade they are still there. Did you compile this or installed the package?
2. http://wiki.nginx.org/HttpRewriteModule answers that ...
3. If I understand correctly you want you want to show files from a folder, that can be done using a location directive + autoindex:

location ~ ^some_page.php\?option=all {
autoindex on;
}

Most of this can easily be found in the wiki...
Re: Several basic questions
April 28, 2012 05:47AM
Sites-available and sites-enabled are 2 dir's You can create beneath your nginx.conf dir or elsewhere - but they are not nescecary for Your nginx to run but a way to create conf files per server (virtuel server in Apache language) so You include the conf file from sites-enabled into nginx.conf (same as including conf files in Apache) thats all (conf files in sites-enabled will be linked to conf files in sites-available - a bit tricky for minor systems though)

E.G in the nginx.conf You have a line : include /xxx/xxx/xxx/sites-enabled/*.conf

hope it helps
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 177
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready