LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
LinkBack Search this Thread
Old 07-20-2009, 11:51 PM   #1
Alck
LQ Newbie
 
Registered: Jul 2009
Posts: 9

Rep: Reputation: 0
Setup/Config Apache Web Service


hi all,

i have installed httpd rpm and i need to configure it. I need to restrict a certain page where client needs to type in username and password to access tat certain page. for that i think i need to configure htaccess?

if i need a page confidential.html as restricted page.where do i put my confidential.html ? issit /var/www/html ?

i need to add a user to access this page...
i need to go /etc/httpd and type htpasswd -c htpasswd username?
is this the correct procedure?

oh ya, how do i upload the file confidential.html into the folder?

hope to hear from you soon. thanks
 
Old 07-21-2009, 12:19 AM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.2, Centos 5.8
Posts: 11,724

Rep: Reputation: 902Reputation: 902Reputation: 902Reputation: 902Reputation: 902Reputation: 902Reputation: 902Reputation: 902
Try this page: http://httpd.apache.org/docs/2.2/howto/htaccess.html
 
Old 07-22-2009, 01:04 PM   #3
Alck
LQ Newbie
 
Registered: Jul 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
Hi thanks. I have get it up and running.
I have another query. for example my site is www.test.com. when client go to this site, it will display apache test website.
how do i remove it and put into my own html file; so that when client type www.test.com, it will show my webpage?
 
Old 07-24-2009, 02:17 AM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.2, Centos 5.8
Posts: 11,724

Rep: Reputation: 902Reputation: 902Reputation: 902Reputation: 902Reputation: 902Reputation: 902Reputation: 902Reputation: 902
You should add your distro name & version to your profile, so we cna help you better.

That said, the DocumentRoot directive in httpd.conf tells you where root dir of the dirs that the html files should be stored in.
Each vhost will have a separate area.
Just put the files there.
You'll need to be root or whatever the apache is running as to do that.
Make sure you not the ownerships and permissions of the default index.html file is currently, and use the same for your files.
Often the DocumentRoot is /var/www/ ... but check the httpd.conf.
Here's the guide for RHEL5, same principles apply to other distros, but details may vary.
http://www.linuxtopia.org/online_boo..._ch-httpd.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need some help to setup a forum (vBulletin 3.6.8) on my web server (apache 2.0). thewhitelion Linux - Server 1 09-15-2007 03:28 PM
How to setup windows apache web hosting server? johncsl82 General 9 04-06-2006 12:48 AM
what linux distribution should I use to setup an Apache web server stteng Linux - Distributions 10 04-03-2005 07:04 PM
apache web server setup eastsuse Linux - Newbie 8 11-22-2004 02:10 PM
Apache Tomcat web Server hardware config homyarb Linux - Software 2 04-16-2003 12:36 AM


All times are GMT -5. The time now is 01:04 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration