LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-10-2011, 08:19 PM   #1
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155
Blog Entries: 2

Rep: Reputation: 15
redirect sites


Hi,

we have our own site is running say for example www.xxx.net which is working fine but when i try to access http://xxx.net it doesnot work. I tried to make in DNS server by creating alias name but no luck.
Also created one entry in apache conf as Serveralias xxx.net under www.xxx.net still same issue.

Is there any way to redirecct whenever we access http://xxx.net which should redirec to www.xxx.net which is configured in apache.
Pls help me this out
Thanks
 
Old 01-10-2011, 08:37 PM   #2
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
server running as
Red Hat Linux release 8.0 (Psyche)

kernel version

2.4.18-14
 
Old 01-10-2011, 09:56 PM   #3
Gmamakis
LQ Newbie
 
Registered: Sep 2010
Location: Greece
Distribution: Fedora, Ubuntu, Slackware, Arch, Sabayon
Posts: 10

Rep: Reputation: 0
inside the httpd folder look for a vhosts configuration file (in Debian it is located in extra)

In there put a virtual host mapping your IP address and port from xxx.net to the folder your site is located

<VirtualHost xxx.xxx.xxx.xxx>
DocumentRoot /www/docs/xxx.net
ServerName xxx.net
</VirtualHost>

If your are using bind you could also map it through bind (as far as I recall) in your zones
 
Old 01-10-2011, 10:16 PM   #4
mr.b-o-b
LQ Newbie
 
Registered: Jan 2011
Location: Edina, MN
Distribution: Slackware, CentOS, Ubuntu, Mint, Debian
Posts: 24

Rep: Reputation: 1
You do not need to use apache's vhosts.conf for this setup. Something must be wrong with your dns.

You should modify your "@" record to point to your apache IP, then create a "www" alias that point to "@". This is what I do, and xxx.net & www.xxx.net have always worked. Either way the dns will serve up the correct IP, and the browser will take you to port 80. As long as you want the xxx.net & www.xxx.net to be the same thing no special setup is required.

Check you DNS.

Good Luck!
 
Old 01-12-2011, 02:36 PM   #5
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
Is there anything like Rewrite options will work in apache conf?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid to block all the sites except 1 or 2 sites winxandlinx Linux - Networking 8 10-27-2010 03:53 AM
why is there difficulty in accesing mail sites in linux whether other sites r working sheenamj Linux - Networking 1 09-18-2009 04:32 PM
squid 2.6 not blocking sites even i entered ACL to block sites mohantorvalds Linux - Server 1 01-08-2009 05:17 AM
How to redirect some sites to othere site in my network bhargavbhai Linux - Networking 2 08-13-2008 05:47 AM
Client cannot open few https://.. sites i.e. secure sites rajeshghy Linux - General 1 11-02-2006 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:24 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration