LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-26-2010, 03:33 PM   #1
rewards
Member
 
Registered: Dec 2010
Posts: 135

Rep: Reputation: 0
Question Apache website access


Hello all. I have two problems here and any feedback from you is highly appreciated. I have web server apache on linux Centos. I can access it successfully by typing on the address bar http://localhost, 127.0.0.1 or 192.168.0.150 from the local computer server and the site loads normally with graphic. When I access the site from another computer in the same local network, I don't get the correct website. I see the site like html as text not graphic. Please see below text file output from the browser: Also I can only access the site by typing 192.168.0.150 IP address in the address bar. When I type http://localhost or 127.0.0.1, the site does not come up. Do you see what I did wrong? How can I fix this problem. Thank you again. . Thank you all.

Email:
Password:
Remember me

* Sign Up
* Forgot Password?


Recent Logins
Admin PHP Local
Admin PHP Local
Sign Up and Start Using php
*Full Name:
*Choose a Username:
http://localhost/index.php?do=/your-user-name/
*Email Address:
*Password:
*Date of Birth:
/ /
*Gender:
*Location:
Time Zone:
*Image Verification:
Reload Image

Type in the verification code above:
*I have read and agree to the Terms of Use and Privacy Policy.
* Required Fields

*
* About
* |Privacy
* |Terms
* |Contact Us
* |Mobile
* |English (US)

Last edited by rewards; 12-26-2010 at 03:49 PM.
 
Old 12-26-2010, 04:11 PM   #2
ilvista
Member
 
Registered: Nov 2010
Location: Ghazaouet
Distribution: Fedora OpenSuse
Posts: 153

Rep: Reputation: 27
fist you can not use Localhost or 127.0.0.1 because it's the loopback adress,you can use it only from the server itself.

http://www.webopedia.com/TERM/L/loopback_address.html

and if the web pages don't came up correctly on another machine and came up correctly on the server when you type localhost
I assume that there is somethings wrong in your browser,try from another machine or another browser.

Best regards.
 
1 members found this post helpful.
Old 12-26-2010, 08:05 PM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,627

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Another take

How you crafted the html links to images, documents, attachments, and external CSS also makes a difference.
If they are relative links, they should work everywhere. If they are specific and you used localhost or 127.0.0.1 in the link, they will fail to load properly from any remote client.
 
1 members found this post helpful.
Old 12-26-2010, 08:08 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
What is the listen port in your httpd.conf file? (It usually defaults to port 80.)

Is the listen port open in the firewall?
 
1 members found this post helpful.
Old 12-27-2010, 01:56 AM   #5
rewards
Member
 
Registered: Dec 2010
Posts: 135

Original Poster
Rep: Reputation: 0
Where and how can I see if httpd.conf uses port 80? I have to also mention that in order for me to you the web script, I had to vi the httpd.com and add this information to the httpd.conf:

# ServerName localhost
<VirtualHost *>
DocumentRoot /var/www/mysite.com
ServerName development.mysite.com
</VirtualHost>

and everytime I restart the httpd I get this message:

[root@localhost ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: Warning: DocumentRoot [/var/www/html/mysite.com] does not exist
[ OK ]

Thank you

Last edited by rewards; 12-27-2010 at 02:39 AM.
 
Old 12-27-2010, 03:51 AM   #6
ilvista
Member
 
Registered: Nov 2010
Location: Ghazaouet
Distribution: Fedora OpenSuse
Posts: 153

Rep: Reputation: 27
the path of the config file is /etc/httpd/conf/httpd.conf
Code:
......................
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded h
 
1 members found this post helpful.
Old 12-27-2010, 03:59 AM   #7
ilvista
Member
 
Registered: Nov 2010
Location: Ghazaouet
Distribution: Fedora OpenSuse
Posts: 153

Rep: Reputation: 27
and for the DocumentRoot [/var/www/html/mysite.com] does not exist error,i think the systax in your
config files is causing it

try this:
Code:
httpd -t
 
1 members found this post helpful.
Old 12-27-2010, 08:08 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
There's a good basic intro to Apache at about dot com.
 
  


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
can only access apache website from within network kubrickfan799 Linux - Networking 3 08-10-2004 06:33 PM
apache install disrupting secure website access? edsmithers Linux - Networking 3 04-23-2004 05:43 PM
Unable to access to a website on apache web server bisbane Linux - Networking 3 07-11-2001 09:18 AM
Unable to access to a website on apache web server bisbane General 3 07-10-2001 11:03 AM
remote access to a website on apache web server bisbane Linux - Newbie 0 07-09-2001 06:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:47 AM.

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