LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 09-26-2014, 04:53 AM   #1
blessanpv
LQ Newbie
 
Registered: Sep 2014
Posts: 3

Rep: Reputation: Disabled
Unhappy Apache Server in Centos 6.5 to host intranet site not working while accessing by name


Hi all,

I have situation like this

1) Centos 6.5 installed with PHP,Mysql and Apache 2.2
2) A domain name (godaddy) pointing to this server via a static ip
3) Port forwarding in the ISP Router to redirect all the request to port 80 be redirected to this server via 80 port

Everything works fine when the site is accessed from outside the network. But when its accessed inside LAN its saying failed to load no data received.



i have hosted the site using default root for the internet access and i have tried the virtual host to get the intranet access work

my httpd conf file looks like this

### Section 2: 'Main' server configuration

ServerAdmin root@localhost

UseCanonicalName Off


DocumentRoot "/var/www/html/xxxxx/web/admin/"

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin webmaster@xxxxxx.in
DocumentRoot /var/www/html/xxxxx/web/admin
ServerName www.xxxxxxx.in
ServerAlias xxxxxxxxx.in

ErrorLog logs/xxxxxxx-error_log
CustomLog logs/xxxxxx-access_log common
</VirtualHost>





1)How can i make it happen such that all clients can access the same site via a site name other than typing the ip address in browser.

2) Is there any method by which i can do it other than editing the hosts file in every client machine ???
 
Old 09-26-2014, 05:28 PM   #2
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
dnsmasq is one option, but you'd need to make the dnsmasq server be the dns resolver for all the client machines. I do this on my LAN, dnsmasq serves up lan-only resolving and passes on anything unresolved locally to my external dns servers.
 
Old 09-28-2014, 11:35 PM   #3
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Rep: Reputation: 72
If my understanding on your scenario is correct, your outside users can access your website by domain name, hence, we can say that they were able to resolve the domain name to your server.

Can your internal clients resolve the hostname?
 
Old 09-29-2014, 10:47 PM   #4
blessanpv
LQ Newbie
 
Registered: Sep 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
@Doug G ..That was a new info .. let me try it out...


@ilesterg .. No for internal clients its saying failed to load no data received.
 
Old 09-29-2014, 10:48 PM   #5
blessanpv
LQ Newbie
 
Registered: Sep 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
Apache Server in Centos 6.5 to host intranet site not working while accessing by name

@Doug G ..That was a new info .. let me try it out...


@ilesterg .. No for internal clients its saying failed to load no data received.
 
  


Reply



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
Accessing Apache/Tomcat web server via host name vs. DNS alias dcarrington Linux - Server 5 01-17-2013 01:04 PM
CentOS Apache Server - identifying (virtual host) target of spam attack Lord Matt Linux - Server 3 04-07-2008 02:17 AM
Hosting a Intranet Web Site in Apache Server Bildge Ratt SUSE / openSUSE 3 08-31-2007 05:14 AM
How to make DNS Server work with intranet with web site on Unbutu Server? explorer1979 Linux - Server 6 04-04-2007 10:50 AM
Apache virtual hosts for intranet and external site tawalker Linux - Software 12 06-25-2004 11:01 AM

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

All times are GMT -5. The time now is 09:54 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