Apache HTTP Server 2.x
Preparation: Updates and Upgrades These commands update your apt system with what is available in the repositories, and upgrade any packages already installed to which upgrades are available. This seems like a good thing to do on a regular basis, or at least before any software installations. Installing Apache Simple. This installs the latest version of Apache HTTP Server 2.x. At the time of this writing, that is version 2.2.14. When the process is complete the server will be started, and you should be able to test it by visiting http://<Elastic IP Address>. You should see a message "It Works!". Starting and Stopping the Server The commands are simple: These commands should be run as root. This might sound like a security hole, but it isn't... From the Apache Documentation: If the From another page of the Apache Documentation : In typical operation, Apache is started by the root user, and it switches to the user defined by the If you take a look at /etc/apache2/apache2.conf you'll find Without you even realizing it, apt created this new user www-data and set up Apache to use it for child processes. Setup A Website apt-get update
apt-get upgrade
apt-get install apache2
/etc/init.d/apache2 start
/etc/init.d/apache2 stop
/etc/init.d/apache2 reload
Listen
specified in the configuration file is default of 80 (or any other port below 1024), then it is necessary to have root privileges in order to start apache, so that it can bind to this privileged port. Once the server has started and performed a few preliminary activities such as opening its log files, it will launch several child processes which do the work of listening for and answering requests from clients. The main httpd
process continues to run as the root user, but the child processes run as a less privileged user. User
directive to serve hits. # These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
mkdir /mnt/data-store/sites
mkdir /mnt/data-store/sites/usgin
mkdir /mnt/data-store/sites/usgin/logs
mkdir /mnt/data-store/sites/usgin/www
chown root:adm /mnt/data-store/sites/usgin/logs
chmod 0750 /mnt/data-store/sites/usgin/logs
chmod 0755 /mnt/data-store/sites/usgin/www
cp /var/www/index.html /mnt/data-store/sites/usgin/www
a2ensite usgin
a2dissite default
/etc/init.d/apache2 reload
- Printer-friendly version
- Login to post comments
Related Community Groups |
---|
CSW Debug Blog | 17 Posts | Join A group blog to discuss metadata Catalog Service for the Web (CSW) implementation experiences |
Building a GeoSciML WFS Server | 11 Posts | Join Development, testing and implementation of a WFS service that returns GeoSciML documents |
ETL Debug Blog | 12 Posts | Join A group blog on implementing and debugging Extract-Transform-Load (ETL) efforts. |
Presentations and Posters | 12 Posts | Join Post your posters and presentations related to USGIN topics. |
Metadata interest group | 13 Posts | Join group for general posting on metadata content, standards, tools |
USGIN Amazon Virtual Server Development | 18 Posts | Invite only Documenting the process of development of a Web Server in the Amazon EC2 environment. Software installations tailored to the requirements for USGIN |
GeoNetwork configuration and development | 7 Posts | Join Discussion on GeoNetwork setup, configuration, and development. |
Student Projects | 0 Posts | Join Discussion of student projects related to USGIN |
Drupal Development | 6 Posts | Join All about bending Drupal to your needs |
Geoportal on an Amazon Virtual Machine | 3 Posts | Closed Installation, configuration, etc. |
Using Django for USGIN | 7 Posts | Request membership Thought and ideas about using Django to accomplish USGIN-related... things. |
ArcGIS Server and OGC Services | 3 Posts | Join Tips on using ArcGIS Server to provide OGC web services |
Content model discussion | 0 Posts | Request membership Community site for comments on development of content models and encoding for information intechange |
Making Web Maps | 2 Posts | Request membership For information about the myriad of mechanisms for showing service data on a web page. |
Troubleshooting Web Service Deployment - Blog | 5 Posts | Join This blog is for documenting our group's experiences with web service deployment. |
Best Practices for USGIN Web Service Hosting | 10 Posts | Join Tips, techniques, and frequently asked questions for hosting AASG Geothermal Data Web Map Services and Web Feature Services |
Hub Disaster Recovery | 0 Posts | Request membership Discussions around how to harden a distributed federated system against disaster; setting up a system to mirror hub VMs at other hubs. |