Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've install Nginx on CentOS 6 without control panel following these steps.

I got Nginx installed successfully, see this link.

But I still have a folder that isn't showing and giving me "not found errors". It's located here: /var/www/html/multicraft.

How can I fix this to let this link above be open in Nginx? Nginx gives me "404 not found" although the folder is there.

Please advise, this is my Nginx configurations:

server {
listen       80;
server_name  localhost;

#charset koi8-r;
#access_log  /var/log/nginx/log/host.access.log  main;

location / {
    root /usr/share/nginx/html;
    index   index.html index.htm;


#error_page  404              /404.html;

# redirect server error pages to the static page /50x.html
error_page   500 502 503 504  /50x.html;
location = /50x.html {
    root   /usr/share/nginx/html;

# proxy the PHP scripts to Apache listening on
#location ~ \.php$ {
#    proxy_pass;

# pass the PHP scripts to FastCGI server listening on
#location ~ \.php$ {
#    root           html;
#    fastcgi_pass;
#    fastcgi_index  index.php;
#    fastcgi_param  SCRIPT_FILENAME  /var/www/html/$fastcgi_script_name;
#    include        fastcgi_params;

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#location ~ /\.ht {
#    allow  all;


share|improve this question

You need to add a section to your file like this:

location /multicraft {
    root /var/www/html/multicraft;
    index   index.html index.htm;
share|improve this answer
i add it /etc/nginx/default.conf but still not working – Rami Server May 26 '13 at 13:35
Are the files in that location owned by nginx's user? What errors are you getting in the log file's under this directory: /var/log/nginx/? – slm May 26 '13 at 13:52
What are you expecting it to look like? I went to this url: and got redirected here:… – slm May 26 '13 at 13:54
its still not working can u send me email :, i will send u server to check problem – Rami Server May 26 '13 at 21:23
slm u have been redirected on httpd working but when nginx work the link isnot working gives u not found 404 or index.php file extract to u to be download – Rami Server May 26 '13 at 21:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.