The Linux Page

Pages with category Web Server

  • Since I got my Android phone earlier this year, I got a huge problem with Google Calendar.

    I use the calendar mainly on my Desktop. Big screen, easy to read and use. But on the Android, the format is Agenda to make it possible to use at all.

    Somehow that has a really bad side effect: the display is now always forced to Agenda on my Desktop too. Really annoying!

    Tere is actually a very easy fix! It took me months the discover it and it's actually very easy.

    I have the Calendar link bookmarked so I can just click one button to get it open.

    All I had to do is add the following anchor at ...

  • Somehow, once in a while, I just don't get my navigation menu at the top of my screen.

    I use the Drupal SimpleMenu module. It works in most cases, yet you have to make sure that your theme include the print $closure before the closing body tag. Something like this:

        ...
        <?php print $closure; ?>
      </body>
    </html>
    

    This will print the simplemenu variable. It is a Javascript variable used to create the menu. It is an array tree with all the menus and sub-menus and their corresponding label and URL. Simple stuff... The author uses SuperFish to get everything ...

  • Let's start with my rant!

    I like Drupal, in general. But like most PHP code bases, if an "error" (mistake) occurs, nothing is reported.

    I spent hours trying to make one of my menu work (Note that the "menu" module is also called the "links" module.) It just did not want to go. In order to have the nice breadcrumb and other such features, you need to have menus with sub-sub-menus...

  • Got to setup a new server and first got the firewall to where I wanted it to be:

    • Block everything except ssh, Apache, SMTP, a few other things, but really not much more than that.
    • Block everything with IPv6 since we don't use it.

    Then I installed Apache and a couple of websites.

    The first one finally started to work, but it was so very slow to show up. I checked the code, the database, nothing wrong... And the database is lightning fast! ( in comparison to our previous server that is.)

    So I wondered and thought maybe that my Apache firewall is in the way. I turned it ...

  • Noticed today that I had an easy to use facebook URL. It goes like this:

    http://www.facebook.com/alexis.wilke

    So, the Facebook URL followed by my first and last name. Easy, hey?

    Another important thing, in your facebook privacy settings, make sure you select the necessary flags so people can see your page! If you make yourself totally private people won't find you and won't be able to see your page!

    You can also let Google, Yahoo!, MSN Live find your profile!

    Sample of where you need to click to get at the right place in Facebook:

    Settings and Privacy Flags to change to make sure people find you!

    It seems this should work with tools and ...

  • Have you seen animated icons in your tabs? This has been working for a while, with IE and FF and Co.

    All you have to do is create an animated GIF file as your "favicon.ico", and it is better to name it .gif, by the way.

    Because icons can now be pretty much any image format, not just .ico

    And if you need some favicon for your site, check this one out: http://www.favicon.cc

    Many of these are free!

  • Working on a PHP application setup, I stumble upon a problem. Going to the installation page, I got the dreadful error:

    Forbidden

    You don't have permission to access <root-path>/admin/install on this server.

    Looking at the error logs, the only thing reported was:

    client denied by server configuration

    The fact is that Apache does not tell you which setting actually forbids the access. I guess that's because once it gets checked by Apache, it is a blend of all the settings and not a tree being followed.

    Looking a round, and since I already had that error not too long ...

  • How to force a download of any file in a CGI script

    I have been wondering for a while, now I have the answer, so I can share it with you guys.

    Your script has to do the following steps:

    1. Print a header which at least includes:

      1. Content-Type: application/force-download

        (you can also use octet-stream instead of force-download)

  • At times you have to prevent users from seeing files under a certain folder such as the /admin/ or /wp-admin/ folder.

    The easiest way to at least avoid having Google index those pages is to add a Disallow line in your robots.txt file. For example:

    Disallow: /admin
    Disallow: /wp-admin

    This is great and 99% of the time it does exactly what you want. Only once in a while a programmer does it wrong and places a file that should be searchable under such folders. For example, maybe someone placed a style.css file which is access by pages other than just pages under /admin. In that case, the ...

  • What a surprise!

    Today, by mistake, I loaded a URL in gVIM instead of my browser. The mind going silly I guess since I had to type :e<space> to load, as usual...

    And to my surprised, it loaded something. Yes! It actually sent the necessary HTTP request and shown the reply in my gVIM window!

    What does this mean? Well! That means I can check out my websites directly in gVIM to see whether they worked as I expected.

    Fantastic! If you ask me... 8-)


    Well... I knew that a firewall could generate a few problems, but this one, I did not expect!

    I just could not FTP anything from my FedoraCore box. I checked the source system firewall, tweaked all sorts of options in the vsftpd.conf file to no aval.

    The error I was getting was this:

    Mon Aug 11 21:31:57 2008 [pid 12033] CONNECT: Client "192.168.2.11"
    Mon Aug 11 21:31:57 2008 [pid 12032] [alexis] OK LOGIN: Client "192.168.2.11"
    Mon Aug 11 21:31:57 2008 [pid 12034] [alexis] FAIL DOWNLOAD: Client "192.168.2.11", \
                   "{fullpath to}/ubuntu-8.04.1-server-amd64.iso", 0.00Kbyte/sec
    

    I read that permissions could be wrong. Not the case.

    The firewall has some REJECT and DROP rules. None of which would increase when I was getting the FAIL DOWNLOAD message.

    The fact was that the FedoraCore system firewall was not accepting the connection. That's why it would fail. I thus opened the firewall a bit by adding a rule like this:

    -A INPUT -i eth0 -p tcp -m tcp -s 192.168.2.1 -d 192.168.2.2 --sport 20 -j ACCEPT

    Then it finally worked.

    Note that I am using FTP in non-passive mode. This is important because I do not want to open "random" ports on my server. There is nothing to control that in vsftpd as far as I know. Which sucks. My company's FTP server will automatically change the firewall and open ports as required. Once the FTP connection ends, the port is closed in the firewall. This means the port is open only very temporarily.

    Anyway, all that to say that the message FAIL DOWNLOAD blah means nothing when it could be telling you: could not connect to client. At least that way you'd know right away what's wrong.

    Well... I knew that a firewall could generate a few problems, but this one, I did not expect!

    I just could not FTP anything from my FedoraCore box. I checked the source system firewall, tweaked all sorts of options in the vsftpd.conf file to no aval.

    The error I was getting was this:

    Mon Aug 11 21:31:57 2008 [pid 12033] CONNECT: Client "192.168.2.11"
    Mon Aug 11 21:31:57 2008 [pid 12032] [alexis] OK LOGIN: Client "192.168.2.11"
    Mon Aug 11 21:31:57 2008 [pid 12034] [alexis] FAIL DOWNLOAD: Client "192.168.2.11", \
                   "{fullpath to}/ubuntu-8.04.1-server-amd64.iso", 0.00Kbyte/sec
    

    I read that permissions could be wrong. Not the case.

    The firewall has some REJECT and DROP rules. None of which would increase when I was getting the FAIL DOWNLOAD message.

    The fact was that the FedoraCore system firewall was not accepting the connection. That's why it would fail. I thus opened the firewall a bit by adding a rule like this:

    -A INPUT -i eth0 -p tcp -m tcp -s 192.168.2.1 -d 192.168.2.2 --sport 20 -j ACCEPT

    Then it finally worked.

    Note that I am using FTP in non-passive mode. This is important because I do not want to open "random" ports on my server. There is nothing to control that in vsftpd as far as I know. Which sucks. My company's FTP server will automatically change the firewall and open ports as required. Once the FTP connection ends, the port is closed in the firewall. This means the port is open only very temporarily.

    Anyway, all that to say that the message FAIL DOWNLOAD blah means nothing when it could be telling you: could not connect to client. At least that way you'd know right away what's wrong.

    Well... I knew that a firewall could generate a few problems, but this one, I did not expect!

    I just could not FTP anything from my FedoraCore box. I checked the source system firewall, tweaked all sorts of options in the vsftpd.conf file to no aval.

    The error I was getting was this:

    Mon Aug 11 21:31:57 2008 [pid 12033] CONNECT: Client "192.168.2.11"
    Mon Aug 11 21:31:57 2008 [pid 12032] [alexis] OK LOGIN: Client "192.168.2.11"
    Mon Aug 11 21:31:57 2008 [pid 12034] [alexis] FAIL DOWNLOAD: Client "192.168.2.11", \
                   "{fullpath to}/ubuntu-8.04.1-server-amd64.iso", 0.00Kbyte/sec
    

    I read that permissions could be wrong. Not the case.

    The firewall has some REJECT and DROP rules. None of which would increase when I was getting the FAIL DOWNLOAD message.

    The fact was that the FedoraCore system firewall was not accepting the connection. That's why it would fail. I thus opened the firewall a bit by adding a rule like this:

    -A INPUT -i eth0 -p tcp -m tcp -s 192.168.2.1 -d 192.168.2.2 --sport 20 -j ACCEPT

    Then it finally worked.

    Note that I am using FTP in non-passive mode. This is important because I do not want to open "random" ports on my server. There is nothing to control that in vsftpd as far as I know. Which sucks. My company's FTP server will automatically change the firewall and open ports as required. Once the FTP connection ends, the port is closed in the firewall. This means the port is open only very temporarily.

    Anyway, all that to say that the message FAIL DOWNLOAD blah means nothing when it could be telling you: could not connect to client. At least that way you'd know right away what's wrong.

Syndicate content

SMS From Me Logo

SMS From Me

To automatically start one on one conversations with your online leads.

     

   

Terms of Site Index

Find the page/content you are looking for with our index.

  • CSV
  • Fox Trot
    A comic strip and books by Bill Armend. More info about Bill Armend.
  • display
  • tool
  • vsftpd

    Very Secure File Transfer Protocol Daemon, an FTP server that allows people to transfer data between computers. It is marked as very secure, at least it is as secure as an FTP server can be (although there has been several security advisories for this tool...)

    Remember that an FTP transfer is rarely using an encrypted pipe (it is possible to use kerberos and SSL to really secure the data transmission) and also because it uses a data stream opened dynamically, it is possible for hackers to spoof a data connection.