4 pages of editing simple configuration files and we're still where we started. Meanwhile, OP has wasted a month on a non-functioning Linode! Derp Derp WTF indeed. Either the skulls are jinxing his server, or we're missing something that is embarrassingly simple.
Edit 1: Just saw your latest post. Your "default" file is completely messed up. Every single line is commented out!
Why don't we try it again from a clean slate.
WARNING: The following steps will delete a bit of data from your server. If you have anything on your server that you haven't backed up elsewhere, BACK IT UP BEFORE PROCEEDING.
If you get any errors during this process, please post the exact error messages here.
1. Delete everything from
/var/www/nginx-default
Code:
rm -rf /var/www/nginx-default/*
2. Reinstall nginx:
Code:
apt-get install --reinstall nginx
3. Deploy your static site to some other directory. Let's call it
/var/www/doodleskull Change your deploy settings in Octopress and make sure that all files are uploaded properly. In particular, make sure that there's a file named /var/www/doodleskull/index.html on your server.
4. Delete all existing configuration files from /etc/nginx/sites-available and /etc/nginx/sites-enabled, with the following commands:
Code:
rm /etc/nginx/sites-available/*
rm /etc/nginx/sites-enabled/*
5. While we're at it, let's just delete /etc/nginx/sites-enabled and symlink the entire directory to /etc/nginx/sites-available. This will make it impossible for any virtual host configuration to be ignored by nginx, ever.
Code:
rmdir /etc/nginx/sites-enabled
ln -s /etc/nginx/sites-available /etc/nginx/sites-enabled
6. Put the following into a file named
/etc/nginx/sites-available/defaultCode:
server {
listen 80 default;
server_name localhost;
root /var/www/nginx-default;
index index.html index.htm;
access_log /var/log/nginx/access.log;
location / {
try_files $uri $uri/ =404;
}
}7. Put the following into a file named
/etc/nginx/sites-available/doodleskullCode:
server {
listen 80;
server_name doodleskull.com www.doodleskull.com derp.doodleskull.com;
server_name_in_redirect off;
root /var/www/doodleskull;
index index.html index.htm;
access_log /var/log/nginx/access.log;
location / {
try_files $uri $uri/ =404;
}
}8. Restart nginx:
Code:
/etc/init.d/nginx restart
9. Clear your browser's cache.
10. Cross your fingers and type derp.doodleskull.com into the address bar.
Edit 2: Fixed a couple of potential problems in the doodleskull file. If you already followed step 7, copy and paste it again.