linux - php page is not opening in /usr/local/ -


i new php,and using php5 in ubuntu 13.10 along apache 2.4. have kept php code in /usr/local/phptest.also have changed apache configuration adding phptest.conf file in conf-available,so when open http://hostname/phptest rather opening main page opens whatever code written in /usr/local/phptest/index.php file.

i have checked php installed properlly putting info.php script in /var/www/.it shows me expected output.

is there configuration need change make working.please me on it.

thanks vinay

two entries required change server root directory:

first being directive document root:

documentroot "/usr/local" 

second being directory privileges:

<directory "/usr/local">    options indexes followsymlinks   allowoverride    order allow,deny    allow  </directory> 

don't forget restart apache after changing configuration.


though mentioned in comments it's not idea so, should use virtualhosts instead


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -