LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache can't show my test page on CentOS 7. (https://www.linuxquestions.org/questions/linux-server-73/apache-cant-show-my-test-page-on-centos-7-a-4175552115/)

hack3rcon 08-30-2015 03:11 AM

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.

hack3rcon 08-30-2015 03:30 AM

Must I configure DNS first?

cjturner 08-30-2015 06:05 AM

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.

ericson007 08-30-2015 06:20 AM

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.


All times are GMT -5. The time now is 05:50 PM.