Trying to set-up a local development environment

blue dust emailbluedust at
Wed Jan 22 09:18:49 UTC 2014

I am a complete newbie to the server side of things. My background has
been installing wamp (, dumping files
into the www folder, and testing via localhost. It all just worked.

Recently I switched to linux (archlinux) and am trying to set-up a
local development environment. This is my project structure:

├── process.php
├── css
│   └── registration.css
├── images
│   ├── bg.png
│   ├── bg_content.jpg
│   ├── in_process.png
│   ├── in_use.png
│   ├── okay.png
│   └── status.gif
├── index.html
├── registration.html
└── thanks.html

This is my nginx.conf:

user http;
worker_processes  1;

events {
    worker_connections  1024;

http {
    server {
        listen       80;
        server_name  localhost;

        location / {
            root /srv/www;
            index index.html;

Now here is where I am stuck and what I think nginx is doing according
to my nginx.conf.

1. The root directive maps request to localhost/ to the local
directory /srv/www in the filesystem and serves up index.html

2. But when I access localhost/registration.html, the html file loads
OK, but the corresponding registration.css fails to take effect. When
I checked it in chrome inspector, the GET request is getting a 304 Not
Modified (even in incognito mode) or a 200 OK (from cache)

What am I doing wrong?

More information about the nginx mailing list