Jeffery J. Jensen, PE
Adjunct Professor
University of Nevada Las Vegas
Department of Civil and Environmental Engineering
4505 S Maryland Pkwy
Box 454015
Las Vegas NV 89154-4015
Email: jefferyjjensen@gmail.com
Mobile: 702-327-9294
Jeff Jensen Notes Apache Web and FTP Server
Apache Topics
Apache Background
Apache Install using XAMPP
- XAMPP by Apache Friends
- Step 0: need Windows XP or 2003 Server. Then visit
XAMPP for Windows
- Windows 2003 Web Edition - recommend disabling the following services
- IIS Admin
- World Wide Web Publishing Service
- Simple Mail Transfer Protocol (SMTP)
- HTTP SSL (double check this, it might be needed)
- Step 1: Download XAMPP ZIP (
xampp-win32-1.7.1.zip) and unzip the file
- Step 2: run the ./XAMPP/xampp-portcheck.exe to see if all ports are free. If
a port is being used, recommend uninstall the software application which is using
it, otherwise XAMPP will not be able to start another service using that port.
Note, this is the last step done by the installer but it would be nice to know this
information before the install is done to ensure a smooth install.
- Step 3: Download XAMPP Installer (
xampp-win32-1.7.1-installer.exe)and install the
XAMPP with the installer.
- Main benefit get the
option to install as a service.
- Recommend installing in C:\XAMPP directory
- Recommend install Apache, MySQL and FileZilla FTP server as a service
- Should get this screen once the Apache and MySQL services have started
- Step 4: XAMPP Control Panel - test Apache and MySQL are running
- Click the Admin... button to the right of the Apache module. This should
open a web browser displaying XAMPP on the localhost. Click the English
link, to open a new webpage. On the left panel, click the Demos - CD Collection
link to also test MySQL is working.
-
- Click the Admin... button to the right of MySQL. This should open the phpmyadmin
webpage (http://localhost/phpmyadmin)
- C:\wamp\htdocs is the default root directory for the web server
- Step 5: check services will start automatically
- using the Windows Administrative Tools -> Services
- If service isn't set for automatic, then when you do a reboot, will have to
manually start the service which likely to be forgotten.
Apache Customization
- Compress Components
- mod_deflate module provides the DEFLATE output filter that allows output from your
server to be compressed files before being sent to the client over the network
- AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
- Steve Souders 14 Rules for Faster-Loading Web Sites - Rule 4: Gzip Components
- DeflateCompressionLevel directive, the value must between 1
(less compression) and 9 (more compression). DeflateCompressionLevel 2
Apache Configuration Files - httpd.conf
- Apache is configured by placing directives in plain text configuration files,
usually called httpd.conf
- Changes to the main configuration files are only recognized by Apache
when it is started or restarted.
- Any directive may be placed in the configuration file
- The location of this file is set at compile-time
- example locations
- WAMP Server installs in
C:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf
- MapGuide Open Source
installs in
C:\Program Files\MapGuideOpenSource2.0\WebServerExtensions\Apache2\conf\httpd.conf
- XAMPP installs in
.\xampp\apache\conf\httpd.conf
- Apache Documentation - httpd.conf Configuration Files
Apache and Passwords
Apache and Server Side Includes (SSI)
Virtual Host and Apache
- DynDNS.com account info: username: jefferyjjensen password: normal
- Custom DNS allows you to setup a domain like www.yourname.com to point to your
IP address. Custom DNS is a paid service and dynamic DNS is free.
- If your ISP is blocking port 80, try the HTTP redirection called
WebHop
- Remote Desktop Tutorial
- Configure DDNS with Linksys Router
- Once you login to the router, click the Setup tab, then WAN tab, under
DDNS Service select DynDNS.org with username jefferyjjensen
password normal, host name: hoamaps.webhop.org then click connect button
-
- References
- Setup Custom Dynamic DNS
- Step 1: Delegate godaddy.com domain registeration to dyndns.org
- In the Godaddy Domain Manager for hoamaps.com, change the nameservers to ns1.mydyndns.org, ns2.mydyndns.org,
ns3, ns4, and ns5 from the default Godaddy nameservers of NS05.DOMAINCONTROL.COM and NS06
- See Custom DNS How-to: Delegation
- If you want the webpage, ftp, and remote desktop to go to the home server
and the email and calendar information to go to the Google Gmail, then edit
the A (Host) and CNAMES (Aliases) records of the Domain Manager in GoDaddy.com.
Problem with this is the solution is when the IP address changes, will have
to manually go into Godaddy and change the IP address. We need a better
solution.
-
- Step 2: setup Custom DynDNS
- FileZilla Forums
- FileZilla Documentation
- Into the main directory of xampp, start "filezilla_setup.bat" for setup. Attention: For Windows NT,
2000 and XP Professional, FileZilla needs to install as service.
Configure "FileZilla FTP". For this, please use the FileZilla Interface with the
"FileZilla Server Interface.exe". Two Users are in this example:
A: A default user "newuser", password "wampp". The home directory is xampp\htdocs.
B: An anonymous user "anonymous", no password. The home directory is xampp\anonymous.
The default interface is the loopback address 127.0.0.1.
The FTP Server is shutdown with the "FileZillaFTP_stop.bat". For FileZilla FTP as service,
please use the "FileZillaServer.exe" directly. Then, you can configure all start options.
-
Apache FtpServer
- Download Apache FtpServer
- How to Install/Reinstall Apache FtpServer
- Background
- From an administration procedure, whenever I need to add a user or make any
changes, I must stop and then start the service
- In a nutshell 1) service uninstall, 2) edit users.properties, 3) service install
and 4) ftpdw to start the service
- Step 0: install Java SE Runtime Environment. This must be already be
installed for Apache FtpServer to work.
- Step 1: download the Apache FtpServer
- Step 2: unzip the file. I copied my files to C:\apache-ftpserver-1.0.0
- Step 3: using the Windows Command prompt, type
service install in the C:\apache-ftpserver-1.0.0\bin directory
- C:\apache-ftpserver-1.0.0\bin\service install ftpd
C:\apache-ftpserver-1.0.0\res\conf\ftpd-typical.xml
- Tip by Sai Pullabhotla (sai.pullabhotla@jmethods.com) -
Not able to connect to ftp
- ftpd-typical.xml uses a default port of 2121 for ftp instead of the
typical port 21
- I had to uninstall the service first by running
service uninstall then run the above service install command
- If doing a reinstall
- 1. Stop the Apache FtpServer ftpd service using the
Windows Control Panel -> Administrative Tools -> Services
- 2. service uninstall
- 3. edited the ftpd-typical.xml text file so the passwords are nolonger
encrypted (encrypt-passwords="false") in the users.properties text file.
<!-- it appears the default is encrypt-passwords="true" if not
specified -->
<!-- <file-user-manager file="./res/conf/users.properties" /> -->
<file-user-manager file="./res/conf/users.properties"
encrypt-passwords="false" />
- Note, cannot use both encrypted passwords and non-encrypted, must
choose one or the other.
- 4. add any new users (username and passwords) to the users.properties
text file
-
ftpserver.user.jjensen.userpassword=normal
ftpserver.user.jjensen.homedirectory=./res/home
ftpserver.user.jjensen.enableflag=true
ftpserver.user.jjensen.writepermission=true
ftpserver.user.jjensen.maxloginnumber=20
ftpserver.user.jjensen.maxloginperip=2
ftpserver.user.jjensen.idletime=300
ftpserver.user.jjensen.uploadrate=4800
ftpserver.user.jjensen.downloadrate=4800
- Note, if you ever have problems with an ftp account not able
to create a directory or upload a file, check the
ftpserver.user.jjensen.writepermission=true, most likely
the value is set to false and thus the reason for the problem
- Note, the homedirectory can be set to the root, C:\ so you then
have access to all files and folders
- 5. C:\apache-ftpserver-1.0.0\bin\service install ftpd
C:\apache-ftpserver-1.0.0\res\conf\ftpd-typical.xml
- Step 4: check the service is running, also from the Windows
Command prompt, type ftpdw
- Step 5: test ftp is working
- ftp
op localhost 2121
- ftp localhost if you changed the port to 21
- username: admin
- password: admin
- Step 6: create your own users and home directory
- edit C:\apache-ftpserver-1.0.0\res\conf\users.properties
- Example Home Directories
- ftpserver.user.anonymous.homedirectory=C:/wamp/www
- ftpserver.user.admin.homedirectory=./res/home
- Step 7: test ftp from outside using IP address
- If the ftp server works with localhost (step 5) but not with the WAN
IP address then its most likely the port is blocked by a firewall
on the server side.
- Step 8: test ftp from outside using domain name
- If using the Go Daddy domain manager, then in the A Host add the IP address
of the server, then in the CNAMES add ftp which points to the A Host using the
@ symbol.
- ftp ftp.gisengineering.com
- Reference