logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: PHP :: serving a page from non default location var/www/html
Author
goudeuk



Joined: 19 Apr 2016
Posts: 2
Location: London

PostPosted: Mon 19 Sep '16 12:28    Post subject: PHP :: serving a page from non default location var/www/html Reply with quote

Hello everyone

I have downloaded an open-source software based on PHP and it says in the install instructions to unzip all files in my website's folder, then browse to the install.php file.
I'm running centos7 so my "website's" folder is
/var/www/html. If I unzip all files in there then I can get to the initial.php file, no problem but if I create a directory inside /var/www/html and unzip the files there then I can not.

Could someone please tell me how should I edit my httpd.conf file, in order to browse to the
initial install.php file using /var/www/html/software/ instead of/var/www/html/?

Many thanks
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 19 Sep '16 14:01    Post subject: Reply with quote

Edit the in /etc/httpd/conf/httpd.conf

Change there the path in Directory and in Documentroot
Back to top
goudeuk



Joined: 19 Apr 2016
Posts: 2
Location: London

PostPosted: Mon 19 Sep '16 16:51    Post subject: Reply with quote

Thanks a lot. It works.

Out of curiosity. Assuming I wanted to keep /var/www/html as the default apache dir, how could I tell apache to also serve pages from a second dir?
For example: /var/www/html/software
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 20 Sep '16 16:33    Post subject: Reply with quote

You would have to create 2 vhosts. Cause if you create one vhost the default host from httpd.conf disappears.
Back to top


Reply to topic   Topic: PHP :: serving a page from non default location var/www/html View previous topic :: View next topic
Post new topic   Forum Index -> Apache