Apache sample page not available

Issues related to configuring your network
Post Reply
mahmood
Posts: 122
Joined: 2017/06/04 12:21:09

Apache sample page not available

Post by mahmood » 2018/08/27 11:43:32

Although I have installed httpd via yum, there is no sample page at /var/www/html

Code: Select all

$ yum list httpd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.saglayici.com
 * extras: mirror.muvhost.com
 * updates: ftp.linux.org.tr
Installed Packages
httpd.x86_64                             2.4.6-80.el7.centos.1                              @updates
$ ls /var/www/
cgi-bin  html
$ ls /var/www/html/
$
Is that OK?

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

Re: Apache sample page not available

Post by pjsr2 » 2018/08/27 13:08:30

There is no sample page in /var/www/html.

Apache httpd configures the location of the default "Welcome" page in the file /etc/httpd/conf.d/welcome.conf.
The contents for that "Welcome" page are located in /usr/share/httpd/noindex/

To disable the "Welcome" page, comment out all lines in /etc/httpd/conf.d/welcome.conf, as described in the comments in that file.

mahmood
Posts: 122
Joined: 2017/06/04 12:21:09

Re: Apache sample page not available

Post by mahmood » 2018/08/28 06:45:46

Do you mean that if I change the DocumentRoot to /usr/share/httpd/noindex/ then I am able to see the sample page? Or I have to change somethings in /etc/httpd/conf.d/welcome.conf
?

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Apache sample page not available

Post by TrevorH » 2018/08/28 09:32:39

The welcome page is configured from that welcome.conf file that you were pointed to. It works only if there is no file in the docroot that is matched by the list of files that it looks for like index.html (list is configurable so you'd need to look and see what files it looks for). If one of those files is not present then it gets an error and the welcome.conf is set to display the welcome page on that error.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply