Blogger templates

Tuesday, 9 April 2013

Apache web server


Apache web server rhel5/6


APACHE (Introduction):

Apache is the world's most popular Web server (HTTP server). The original version of Apache was written for UNIX, but there are now versions that run under OS/2, Windows and other platforms. 

The Apache Web server provides a full range of Web server features, including CGISSL, and virtual domains. Apache also supports plug-in modules for extensibility. Apache is reliable, free, and relatively easy to configure.


Configuring Apache Web Server (RedHat/CentOS)

# yum   install  *httpd*(Install the package)
# cd  /var/www/html
(go the html folder)





# vim  index.html(create an html page, name must be index.html)

# vim  /etc/httpd/conf/httpd.conf(now go to bottom of the document  and type following)
ServerAdmin  root@domain.com
DocumentRoot  /var/www/html
ServerName  srv1.domain.com
ErrorLog   logs/srvb1.domain.com-error_log
CustomLog  logs/srv1.domain.com-access_log  common


(now go to 99% #NameVirtualHost  *:80 and type following)
NameVirtualHost 192.168.1.11:80

# service  httpd  start
How to set password in apache web server. User require while opening the web site.

# cd  /var/www/html

# touch   .htaccess

# vim  /var/www/html/.htaccess(Type the following)AuthName  “restricted  stuff”
AuthType  Basic
AuthUserFile  /etc/httpd/conf/.htpasswd-file
Require  valid-user

#  vim /etc/httpd/conf/httpd.conf(go to 31% and type the following)DocumentRoot “/var/www/html”
AllowOverride AuthConfig

# cd /etc/httpd/conf

# htpasswd  -mc  .htpasswd-file  user1New Password:
Retype new password:

# service httpd start
Now open web browser and open website, it will require username and password. Give username user1 and its password.

No comments:

Post a Comment

 

Blogroll

Hello Friends myself Sahaj Ohri live at Jaipur city , This Website is mainly for Youth, You can explore a youth network here on www.techowner.blogspot.in As it is generally an information sharing platform when you can get information and also share information. If you are having some information.I am 19 years old guy from India who have interest in making blogs.I am a simple guy who likes to spent his time with Friends,watching movies,and reading various types of books. I loves to sharemy personal view with those people who have interest inmaking website, blog etc.Here I also give you some technical knowledge about making website attractive and some other technical support(knowledge) using WordPress as your CMS.Dear Friends, As an author, I’m trying my best to improve this platform day by day. If you are having any idea or suggestion in your mind about this website then you are free to contact me and share your thought. Contact : For Issues regarding advertisement, copyright issues or ideas sharing, you can contact us on the following details. sahaj.ohri3@gmail.com

About

Hello Friends myself Sahaj Ohri live at Jaipur city , This Website is mainly for Youth, You can explore a youth network here on www.techowner.blogspot.in As it is generally an information sharing platform when you can get information and also share information. If you are having some information.I am 19 years old guy from India who have interest in making blogs.I am a simple guy who likes to spent his time with Friends,watching movies,and reading various types of books. I loves to sharemy personal view with those people who have interest inmaking website, blog etc.Here I also give you some technical knowledge about making website attractive and some other technical support(knowledge) using WordPress as your CMS.Dear Friends, As an author, I’m trying my best to improve this platform day by day. If you are having any idea or suggestion in your mind about this website then you are free to contact me and share your thought. Contact : For Issues regarding advertisement, copyright issues or ideas sharing, you can contact us on the following details. sahaj.ohri3@gmail.com