Skip to content

JCortes Web

JCortes Technical Blog

Archive

Category: Linux

If you are a web designer, such as myself, you know the importance of having access to a web server through FTP. I just recently set up an FTP server on my Ubuntu Linux server using ProFTPD and I was surprised at how easy it was to setup and configure.This guide shows the few simple steps you can do to install ProFTPD on your Linux server.

Downloading / Installing

As with most software installations in Linux there are two ways you can install this package.

Apt-get:

Simply issue the following command:

sudo apt-get install proftpd gadmin-proftpd

When prompted to install the packages simply press Y to install the packages and their dependencies.

Synaptic:

To install through Synaptic Package Manager simply open the package manager (System > Administration > Synaptic Package Manager)

and Search for proftpd

Right click the packages proftpd and gadmin-proftpd (GUI Package) and select Mark for Installation.

At the top of your screen press Apply to install the packages and dependencies.

Configuration

Server Setup

Now its time to setup your sever so you can connect. In my example I will be setting up a user account for a web user as most of you will.

Open up the gadmin-proftpd GUI (Applications >System Tools > GADMIN-PROFTPD)

GAdmin-ProFTPD Main Screen

GAdmin-ProFTPD Main Screen

As seen in the picture above fill out the following fields

Server Address: 10.0.0.100 (The address of your FTP Server)

Server Name: Local FTP Server (This is used to describe the server)

Admin Email: admin@example.com (This is an administrative contact email address)

User Setup

Next you will need to add users to your ftp to connect.

ProFTPD User Menu

ProFTPD User Menu

As seen in the picture above fill in the following fields.

NOTE: All of the following fields must be filled in before you press Add

Username: User (the user name you will use to login)

Password: Password (Used to authenticate user)

Group: administrator (Group of user)

NOTE: Don’t Press Add yet!

Click Add Directory at the bottom, this will open the “Explorer” window to browse for your directory. In my case I selected the /var/www for access to the web directory.

NOTE: Once you select the directory make sure you select every check box.

At this point you may click Add assuming all was filled out correct the new user will appear in the list.

Now start the server! At the top bar click Apply, this will apply any loose settings. Then click Deactivate and then Activate.

Connecting

Now that your server is setup you should try to connect to it.

Open your favorite FTP Client, I personally love FileZilla.

Enter the Host, User name and Password then click connect on your FTP Client and see if it works

Troubleshooting

If you run into problems first try restarting the ProFTPD server

sudo /etc/proftpd restart

If you have other problems please leave a comment below, I actively monitor my site and I will respond as soon as possible.

Ubuntu Linux is the most popular distribution of Linux. In this tutorial I will show you how to setup your own web server running LAMP (Linux, Apache, MySQL, PHP).

NOTE: I’m writing this guide assuming that you know how to setup and install Ubuntu Linux

Apache2 / PHP5 / MySQL

There are two ways you can install Apache, trough Synaptic Package Manager (System > Administration > Synaptic Package Manager) or using the apt-get command

Synaptic:

Simply go to Synaptic Package Manager and Search for Apache2, PHP5, mysql-server, mysql-client and phpmyadmin (if you choose)

right click each package and mark it for installation.

Then click apply and let it install, simple as that.

Apt-get:

Issue the following commands at the terminal (Applications > Accessories > Terminal)

sudo apt-get update
sudo apt-get install apache2 php5 mysql-server mysql-client

NOTE: I only included the php5 package, depending on your needs you will have to install additional packages, PHP will resolve the required dependencies. I also recommend installing the phpmyadmin package as well.

When prompted to install enter Y this will install Apache2, PHP5, mysql-server, mysql-client and their dependencies.

Testing the Apache server:

Once you have installed the Apache server you should test it by going to http://localhost/

The page should display

It Works!

Aditional Information:

If the page does not display when you go to local host try issuing the following command

sudo /etc/ini.d/apache2 restart

Also just FYI the document root for the web files is located at:

/var/www/

Problem

I had been working on updating one of my servers to Linux when I came Across a strange bug when using a certain script.

Apparently in Internet Explorer 6 GZip does not work, this is what compresses pages to make them load faster.

The result of this bug was that about half or the items in my script would not load and they returned blank pages.

Solution

After much research I found that the bug was in the mod_deflate module of apache.

First I had to go edit the file /etc/apache2/mods-enabled/deflate.conf

Once there I replaced the current content with the following

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.[0678] no-gzip
BrowserMatch \bMSIE\s7Â !no-gzip !gzip-only-text/html
</IfModule>

Then all I needed to do was restart Apache (“sudo /etc/init.d/apache2 restart“) and it was fixed.

<IfModule mod_deflate.c>
          AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript
	  BrowserMatch ^Mozilla/4 gzip-only-text/html
	  BrowserMatch ^Mozilla/4\.[0678] no-gzip
	  BrowserMatch \bMSIE\s7Â !no-gzip !gzip-only-text/html
</IfModule>