Apache Notes

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

(Books and Tutorials)

1. Tutsplus - Understanding Apache and htaccess


2. Pluralsight - Installing and Configuring Apache Web Server
3. Apache 2.3 Documentation
4. Apache-Complete Guide(Dedoimedo)
Q: What is virtual host?
A1: Virtual hosting is a method for hosting multiple domain names on a single se
rver. This allows one server to share its resources, such as memory and processo
r cycles, without requiring all services provided to use the same host name.
A2: Often abbreviated vhost, a virtual host is a provider of Web services that i
nclude server functions and Internet connection services. A virtual host is ofte
n used by companies or individuals that do not want to purchase and maintain the
ir own Web servers and Internet connections.
A virtual host will provide its customers with domain name registration, file st
orage and directory services for the files that Web page is built from, e-mail s
ervices and even Web site design and creation services if the customers want som
eone else to build their Web sites.
A limitation of using a virtual host is that the customer shares the Web service
s with all the other customers of the virtual host. If the virtual host is runni
ng multiple sites off the same server, then those sites will be competing for We
b server resources.
* This is part of the basic Apache server configuration in WAMP.
ServerRoot "c:/wamp/bin/apache/apache2.2.11"
Listen 80
ServerName localhost:80
DocumentRoot "c:/wamp/www/"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
ErrorLog "c:/wamp/logs/apache_error.log"
LogLevel warn
<IfModule>
...
...
</IfModule>
Explanation:
Site content will be placed in the c:/wamp/www/ directory, which will then be av
ailable at the '/' URL that is, http://localhost/ will serve content from that dir
ectory.
The ErrorLog directive specifies a location where the log entries will be writte
n.
*
Q: What is an .htaccess file?
A: .htaccess files exist for these situations. .htaccess files permit configurat
ion changes on a per-directory basis. That is, a .htaccess file in a given direc
tory may override the configuration for that directory, and
subdirectories thereof.
*
Modules can be loaded or unloaded as desired using the LoadModule directive. Loa
dmodule indicates the name of the module, and the location of the file containin
g that module.
Example:
LoadModule rewrite_module modules/mod_rewrite.so
*
(TOPICS)
virtual hosts
Secure Sockets Layer(SSL)
alias and redirection
authentication - the directory will be protected by password
Access Control - allow or deny to specific URLs
.htaccess
URL Rewriting
prevent directory indexing
Useful Links:
------
ROUGH
-------
(Reading Strategy)
From Refcardz cheat sheet know what the required topics are.
Read the relevant topics from 'Apache 2.3 Documentation.pdf', 'Apache-Complete G
uide(Dedoimedo).pdf' and make notes.
-
A PHP developer will mostly work with .htaccess files which handle authenticatio
n, access,(what more), etc. Tasks which need access to the server, such as, load
ing module, creating virtual host, etc. may be done by a network administrator o
r hosting provider. A PHP developer may not be asked to do them.
(Apache tutorials on Nettuts)
http://code.tutsplus.com/tutorials/an-introduction-to-apache--net-25786
http://code.tutsplus.com/articles/apache-2-basic-configuration-on-unix-like-syst
ems--net-26607
http://code.tutsplus.com/articles/apache-2-advanced-configuration-on-unix-like-s
ystems--net-26244
http://code.tutsplus.com/tutorials/an-in-depth-guide-to-mod_rewrite-for-apache--
net-6708
http://code.tutsplus.com/articles/apache-aliasing-and-redirection--net-28606
http://code.tutsplus.com/articles/htaccess-files-for-the-rest-of-us--net-23827
http://code.tutsplus.com/tutorials/http-succinctly-http-connections--net-33707
http://code.tutsplus.com/tutorials/http-succinctly-http-web-architecture--net-33
716
...
Apache is a complicated subject. I have not been able to find any tutorial that
explains clearly and briefly the working of Apache and the most essential topics
one should know. You have to read from several sources, preferably in this orde
r. You also have to avoid very complicated topics in the beginning. Apache is us
ually installed on Linux. You have to understand Linux to know how they work tog
ether. So, being used to Windows only, know what you can know and avoid what you
can not. The following nettuts articles can serve as summary of your learning f
rom books and video tutorials which unfortunately do not understand the problems
of an absolute beginner.
http://code.tutsplus.com/tutorials/an-introduction-to-apache--net-25786
http://code.tutsplus.com/articles/apache-2-basic-configuration-on-unix-like-syst
ems--net-26607
http://code.tutsplus.com/articles/apache-2-advanced-configuration-on-unix-like-s
ystems--net-26244

You might also like