LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-30-2015, 03:11 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 11
Thumbs down Apache can't show my test page on CentOS 7.


Hello.
I install and configure Apache from below link :

http://www.server-world.info/en/note..._7&p=httpd&f=1

and I changed :

ServerAdmin root@server.world ==> ServerAdmin root@linux.dj
ServerName www.server.world:80 ==> ServerName www.linux.dj:80


But when I open my Firefox and enter "www.linux.dj/index.html" it show me page can't find, But when I use "localhost", It show me!!!!
What is my problem?

Tnx.

Last edited by hack3rcon; 08-30-2015 at 03:17 AM.
 
Old 08-30-2015, 03:30 AM   #2
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Must I configure DNS first?
 
Old 08-30-2015, 06:05 AM   #3
cjturner
LQ Newbie
 
Registered: Nov 2006
Posts: 20

Rep: Reputation: 10
Apache can't show my test page on CentOS 7.

security settings...Looks like you want to configure ports to allow incoming traffic on 80.
 
Old 08-30-2015, 06:20 AM   #4
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 735

Rep: Reputation: 154Reputation: 154
You are correct. DNS will be required to solve the host names.

I really hope you do not use the same names as in the example. They are not your domain.

If you type the IP address of the webserver from a different computer, it should show you the page.

If it does not, your firewall is blocking port 80. Centos 7 does not open it by default.

So you should run (as root or user configured to modify firewall)

Code:
 firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --reload
After this it should work if using IP addresses. To resolve the hostname, check your router if it allows you to add entries. If it does not and you do not want to set up a complete DNS server, you can edit the hosts file on the computer you are trying to connect from

Code:
 nano /etc/hosts

#ADD IP OF HTTP SERVER
192.168.xx.yy your.server.name your
further more, if you edited the html page like they suggest on the bottom of the tutorial, this will replace the default centos page. The centos page only shows when there is nothing to display. As soon as you create content, that page will be replaced.

At the top of the tutorial, it says remove welcome page. Don't do this either. It is not needed.

Last edited by ericson007; 08-30-2015 at 06:21 AM.
 
1 members found this post helpful.
  


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
[SOLVED] apache 2 test page show? fairladyz Linux - Server 7 01-20-2013 07:34 PM
hostname not bringing the Apache test page in CentOS 6.2 newpreludeking Linux - Distributions 1 09-13-2012 03:02 AM
How to get Apache 2 Test Page back - CentOS 5 satimis Linux - Distributions 5 01-15-2008 04:46 AM
CentOS apache test page geosko Linux - Server 21 10-14-2006 12:52 PM
I cant change the default test page in apache server to add my page.y nhemapriya Linux - Newbie 3 05-13-2004 12:35 PM

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

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