Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject:
PostPosted: Wed Mar 07, 2012 5:28 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
http://derp.doodleskull.com/archives/ seems to load fine at the moment. Looks like you fixed the link to include a slash at the end? But the redirection problem hoopycat mentioned is still present, which means something is still off.

doodleskull wrote:
OT question: (hybinet if you're around I like to hear your opinion) should I do webcomics/image+text based stories on my site or should I do videos? Like if I turned this thread into a story, would you prefer a written/drawn story or a animated video with drawings?

I'm asking this because I don't know in which I should focus my time on, drawing images or making animated videos. Not many people do animated videos in the webcomic realm so that's an interesting option. I originally thought I'd do both, written stories with drawings and animated videos but I just don't have time for both.

I'm just a guy who likes to help people set up Apache and/or nginx on their Linodes. I usually don't even comment on other types of technical questions. So I don't think I'm qualified to give any opinions about the "webcomic realm".

But I do get the impression that your doodles contain more text than the typical webcomic. Your comics almost look like blog posts with occasional images inserted here and there. Perhaps you just want to tell a story and don't like to draw dozens of frames to go with it? If so, perhaps a video might suit you better. You can just draw a few things and move them around to tell a story. But then, I don't know anything about video production. Does it take longer than drawing comics?

But some of your doodles actually do seem to make use of idioms that are more suited to static images, like the side-by-side comparison in this comic as well as the comparison below that. How would you express the same ideas in a video without making it look like you just pointed a camcorder at your pictures? From what little experience I have for procrastinating on YouTube, I gather that when people watch videos, they expect to see video-specific idioms.

Or maybe really should do both, depending on which format suits a particular story better? After a while you can decide which format you like better, and concentrate more on it. There's no need to restrict yourself to one format, when you might come up with a story tomorrow that is more appropriate for another format.

Finally, why does the front page not have a "Next" button? I do know a few things about how web sites work, and I don't like it when I have to scroll all the way back to the top to click "Stories". But everyone knows how to navigate a blog. Allow them to click "Next" and view the next comic, whether that's a picture or a video.


Top
   
 Post subject:
PostPosted: Sun Mar 11, 2012 3:15 pm 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
nginx.conf from /etc/nginx

Code:
user www-data;
worker_processes  1;

error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
    # multi_accept on;
}

http {
    include       /etc/nginx/mime.types;

    access_log   /var/log/nginx/access.log;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    tcp_nodelay        on;

    gzip on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

# mail {
#     # See sample authentication script at:
#     # http://wiki.nginx.org/NginxImapAuthenticateWithApachePhpScript
#
#     # auth_http localhost/auth.php;
#     # pop3_capabilities "TOP" "USER";
#     # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#     server {
#         listen     localhost:110;
#         protocol   pop3;
#         proxy      on;
#     }
#
#     server {
#         listen     localhost:143;
#         protocol   imap;
#         proxy      on;
#     }
# }


Top
   
 Post subject:
PostPosted: Sun Mar 11, 2012 3:17 pm 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
default file from /etc/nginx/sites-available

Code:
# You may add here your
# server {
#   ...
# }
# statements for each of your virtual hosts

server {
   listen   80 default;
   server_name  localhost;

   access_log  /var/log/nginx/localhost.access.log;

   location / {
      root   /var/www/nginx-default;
      index  index.html index.htm;
   }

   location /doc {
      root   /usr/share;
      autoindex on;
      allow 127.0.0.1;
      deny all;
   }

   location /images {
      root   /usr/share;
      autoindex on;
   }

   #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   /var/www/nginx-default;
   #}

   # proxy the PHP scripts to Apache listening on 127.0.0.1:80
   #
   #location ~ \.php$ {
      #proxy_pass   http://127.0.0.1;
   #}

   # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
   #
   #location ~ \.php$ {
      #fastcgi_pass   127.0.0.1:9000;
      #fastcgi_index  index.php;
      #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
      #includefastcgi_params;
   #}

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


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
#listen   8000;
#listen   somename:8080;
#server_name  somename  alias  another.alias;

#location / {
#root   html;
#index  index.html index.htm;
#}
#}


# HTTPS server
#
#server {
#listen   443;
#server_name  localhost;

#ssl  on;
#ssl_certificate  cert.pem;
#ssl_certificate_key  cert.key;

#ssl_session_timeout  5m;

#ssl_protocols  SSLv2 SSLv3 TLSv1;
#ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
#ssl_prefer_server_ciphers   on;

#location / {
#root   html;
#index  index.html index.htm;
#}
#}


doodleskull file from /etc/nginx/sites-available


Code:
server {
   listen   80 default;
   server_name  derp.doodleskull.com doodleskull.com www.doodleskull.com;

   access_log  /var/log/nginx/localhost.access.log;

   location / {
      root   /srv/doodleskull;
      index  index.html index.htm;
   }


Top
   
 Post subject:
PostPosted: Sun Mar 11, 2012 4:41 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Just to make sure we're looking at the right thing here, what do you get for 'ls -l /etc/nginx/sites-enabled/' ?

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Sun Mar 11, 2012 4:50 pm 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
Quote:
Just to make sure we're looking at the right thing here, what do you get for 'ls -l /etc/nginx/sites-enabled/' ?


This:

Code:
total 0
lrwxrwxrwx 1 root root 34 2012-02-25 12:32 default -> /etc/nginx/sites-available/default


Top
   
 Post subject:
PostPosted: Sun Mar 11, 2012 6:05 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Bam! OK. That means all of the config is in /etc/nginx/sites-available/default, so it's looking at the server_name line in there to determine its hostname.

Here's what I would do, to stay sane:

1) cp /etc/nginx/sites-available/default /etc/nginx/sites-available/doodleskull
2) Edit /etc/nginx/sites-available/doodleskull.com so that the server_name line is "server_name derp.doodleskull.com doodleskull.com www.doodleskull.com;"
3) ln -s /etc/nginx/sites-available/doodleskull /etc/nginx/sites-enabled/doodleskull
4) Restart nginx (service nginx restart). Make sure your web site still works OK. If not, rm /etc/nginx/sites-enabled/doodleskull, restart nginx, and hopefully you'll be back where you were.
5) rm /etc/nginx/sites-enabled/default
6) Restart nginx (service nginx restart). Make sure your web site still works OK. If not, ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default, restart nginx, and hopefully you'll be back where you were.

And I think that should do the trick...

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Sun Mar 11, 2012 10:15 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
From the second post in this thread, dated February 20th:

hybinet wrote:
Done? Now issue the following commands:
Code:
ln -s /etc/nginx/sites-available/doodleskull /etc/nginx/sites-enabled/doodleskull
/etc/init.d/nginx reload

The first line there = line #3 in hoopycat's latest post.

I guess you ran these commands at the time, but then it probably got lost in the process of uninstalling and reinstalling various things. (Yeah, those symlinks definitely existed when you posted the last post in the first page of this thread.)

I'd also suggest deleting the "location /doc" and "location /images" lines (and the following 3-5 lines that belong in the same block) from the new "doodleskull" configuration file. They can conflict with files from your own static site.

RANT: Honestly, I don't really see the point of separating "sites-available" and "sites-enabled" in a typical nginx setup. There was a time when these folders didn't exist. You'd just drop some files in a folder and restart nginx, and it would work. "Sites-enabled" was added by the Debian team some time in the last few years, probably because they wanted to standardize the directory structure with what they've had with Apache for a long time. But what's the point of making web sites disabled by default? If I wanted to disable a site, I'd just move the corresponding configuration file somewhere else, like "sites-disabled". In fact, that's what I do with all my nginx installs. I symlink the entire "sites-enabled" directory to "sites-available" and call it a day.


Top
   
 Post subject:
PostPosted: Sun Mar 11, 2012 11:28 pm 
Offline
Senior Member

Joined: Sun Feb 21, 2010 5:12 pm
Posts: 64
If they had copied the scripts that make the structure work, a2ensite and a2dissite, it might have made more sense.


Top
   
 Post subject:
PostPosted: Mon Mar 12, 2012 4:47 pm 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
Current status of derp.doodleskull.com: 404 / Not found (nginx/0.7.65)

The following events take place between one WTF and three WTFs:

Code:
1) cp /etc/nginx/sites-available/default /etc/nginx/sites-available/doodleskull 
2) Edit /etc/nginx/sites-available/doodleskull.com so that the server_name line is "server_name derp.doodleskull.com doodleskull.com www.doodleskull.com;"
3) ln -s /etc/nginx/sites-available/doodleskull /etc/nginx/sites-enabled/doodleskull
4) Restart nginx (service nginx restart). Make sure your web site still works OK.


This worked fine. Remember I had those slashes at the end of site links? Yeah, I thought I'd get rid of them, if the site worked fine now.

Nope. That resulted a redirection to localhost again. Should have kept those slashes.

Next I tried:
Quote:
If not, rm /etc/nginx/sites-enabled/doodleskull, restart nginx, and hopefully you'll be back where you were.
5) rm /etc/nginx/sites-enabled/default
6) Restart nginx (service nginx restart). Make sure your web site still works OK.


Still redirected to localhost. The configurations in doodleskull file at /etc/nginx/sites-available also got overwritten or deleted, on the second or first step.

Finally I went for:
Quote:
If not, ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default, restart nginx, and hopefully you'll be back where you were.


and added "server_name derp.doodleskull.com doodleskull.com www.doodleskull.com;" to server_name line in /etc/nginx/sites-available/doodleskull, which resulted a 404.

WTF, WTF and possibly: another WTF.


Top
   
 Post subject:
PostPosted: Mon Mar 12, 2012 5:01 pm 
Offline
Senior Member
User avatar

Joined: Wed Apr 20, 2011 1:09 pm
Posts: 63
Be sure to clear your web browser's cache - that may be affecting/continuing the redirect when the server no longer is...errr, serving it. Either that, or hop into "Incognito/Private Browsing/Porn mode" on whatever browser you use to get around the cache.

_________________
うるさいうるさいうるさい!


Top
   
 Post subject:
PostPosted: Mon Mar 12, 2012 5:11 pm 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
Quote:
clear your web browser's cache


I thought that too, however no help from that either.

I'll put the configuration files here again, if those can reveal something:

First, nginx.conf from /etc/nginx

Code:
user www-data;
worker_processes  1;

error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
    # multi_accept on;
}

http {
    include       /etc/nginx/mime.types;

    access_log   /var/log/nginx/access.log;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    tcp_nodelay        on;

    gzip on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

# mail {
#     # See sample authentication script at:
#     # http://wiki.nginx.org/NginxImapAuthenticateWithApachePhpScript
#
#     # auth_http localhost/auth.php;
#     # pop3_capabilities "TOP" "USER";
#     # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#     server {
#         listen     localhost:110;
#         protocol   pop3;
#         proxy      on;
#     }
#
#     server {
#         listen     localhost:143;
#         protocol   imap;
#         proxy      on;
#     }
# }


Next, the default file from /etc/nginx/sites-available:

Code:
# You may add here your
# server {
#   ...
# }
# statements for each of your virtual hosts

server {

   #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   /var/www/nginx-default;
   #}

   # proxy the PHP scripts to Apache listening on 127.0.0.1:80
   #
   #location ~ \.php$ {
      #proxy_pass   http://127.0.0.1;
   #}

   # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
   #
   #location ~ \.php$ {
      #fastcgi_pass   127.0.0.1:9000;
      #fastcgi_index  index.php;
      #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
      #includefastcgi_params;
   #}

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


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
#listen   8000;
#listen   somename:8080;
#server_name  somename  alias  another.alias;

#location / {
#root   html;
#index  index.html index.htm;
#}
#}


# HTTPS server
#
#server {
#listen   443;
#server_name  localhost;

#ssl  on;
#ssl_certificate  cert.pem;
#ssl_certificate_key  cert.key;

#ssl_session_timeout  5m;

#ssl_protocols  SSLv2 SSLv3 TLSv1;
#ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
#ssl_prefer_server_ciphers   on;

#location / {
#root   html;
#index  index.html index.htm;
#}
#}


And lastly, the doodleskull file from /etc/nginx/sites-available:

Code:
# You may add here your
# server {
#   ...
# }
# statements for each of your virtual hosts

server {
   listen   80 default;
   server_name  derp.doodleskull.com doodleskull.com www.doodleskull.com;
    server_name_in_redirect off;

   access_log  /var/log/nginx/localhost.access.log;

   location / {
      root   /var/www/nginx-default;
      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   /var/www/nginx-default;
   #}

   # proxy the PHP scripts to Apache listening on 127.0.0.1:80
   #
   #location ~ \.php$ {
      #proxy_pass   http://127.0.0.1;
   #}

   # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
   #
   #location ~ \.php$ {
      #fastcgi_pass   127.0.0.1:9000;
      #fastcgi_index  index.php;
      #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
      #includefastcgi_params;
   #}

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


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
#listen   8000;
#listen   somename:8080;
#server_name  somename  alias  another.alias;

#location / {
#root   html;
#index  index.html index.htm;
#}
#}


# HTTPS server
#
#server {
#listen   443;
#server_name  localhost;

#ssl  on;
#ssl_certificate  cert.pem;
#ssl_certificate_key  cert.key;

#ssl_session_timeout  5m;

#ssl_protocols  SSLv2 SSLv3 TLSv1;
#ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
#ssl_prefer_server_ciphers   on;

#location / {
#root   html;
#index  index.html index.htm;
#}
#}


Top
   
 Post subject:
PostPosted: Mon Mar 12, 2012 5:29 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
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/default
Code:
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/doodleskull
Code:
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.


Top
   
 Post subject:
PostPosted: Mon Mar 12, 2012 6:09 pm 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
IT WORKS!

Any possibility to remove those trailing slashes from the end of each link? (skull.com/about/, skull.com/link/, etc.)

Or are those essential to keep the site working?


Top
   
 Post subject:
PostPosted: Mon Mar 12, 2012 7:06 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
doodleskull wrote:
IT WORKS!

Great!

doodleskull wrote:
Any possibility to remove those trailing slashes from the end of each link? (skull.com/about/, skull.com/link/, etc.)

Or are those essential to keep the site working?

That probably depends on how Octopress generates the directory structure. But since most web servers won't serve files with the text/html content type unless the filename ends with ".html" or ".htm", I don't think "/archives" will work. When a static site generator tells you to use "/archives/" as the URL, the actual web page is most likely being stored as "/archives/index.html". So "/archives/" is about as short as it gets.

The "try_files" line in the nginx config is supposed to handle the redirect from "/archives" to "/archives/". As long as you have that line in your config, you won't have redirect issues anymore. But the actual URL will always have a trailing slash.


Top
   
 Post subject:
PostPosted: Tue Mar 13, 2012 3:20 am 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
I have no trailing slashes in Octopress, for example the about page is: skull.com/about.

When I type some page link in the address bar, say that about page again, it redirects me to skull.com/about/, which is fine for me. If it wouldn't had directed to that, as in the link would not have worked without actually typing that last slash in the link, that may have been a problem. People don't remember that trailing slash ever, so that kind of redirection is good.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group