I 'm currently teaching myself PHP and to test them out I've made a web app called 'mysite' and I put my websites into the /var/hda/web-apps/mysite/html/ file. I also recursively changed the group of mysite to 'users'. (I copied the owner and premissions layout from the homeinv app)
I would like to go to 'mysite' and browse the directory to find the page I would like to load, but when I type in 'mysite' into the url is comes up with the page 'Test Page for the Apache HTTP Server on Fedora', and if I go to a directory like 'mysite/images' it comes up with the directory contents titled 'Index of /images'.
Who an I able to browse the initial directory 'mysite'?
Also if I go to a PHP file it opens up but without the PHP script proccessed. How do I enable PHP on the web app?
Problem with web app indexing and PHP
Problem with web app indexing and PHP
Amahi 6, x86_64 Fedora 14, Zotac IONITX-B-E min-ITX
Nvidia Ion, Intel Atom N230 1.6GHz, DDR2 1024MB 800MHz, 1TB WD Carviar Green 7200rpm.
Nvidia Ion, Intel Atom N230 1.6GHz, DDR2 1024MB 800MHz, 1TB WD Carviar Green 7200rpm.
Re: Problem with web app indexing and PHP
webapps are the perfect thing for learning php and web development!
i just tried this: create a webapp called mysite. when i go to http://mysite i see an empty index: i can create files in /var/hda/web-apps/mysite/html (as root, just to not bother with permissions right now) and see them in the browser.
i can do this:
and i see a file test.php. when i click on test.php, i see the trillion php settings. not the code.
maybe you have a permission issue?
i just tried this: create a webapp called mysite. when i go to http://mysite i see an empty index: i can create files in /var/hda/web-apps/mysite/html (as root, just to not bother with permissions right now) and see them in the browser.
i can do this:
Code: Select all
echo "<?php echo phpinfo(); ?>" > test.php
maybe you have a permission issue?
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1
Re: Problem with web app indexing and PHP
I deleted mysite and remade the web app so it went back to its defaults. Now PHP works but I'm still not able to look at the root directory.
URL: http://mysite/ comes up with; I tried removing the index pages of other web-apps and the Test page come up as well. When I actually read the Test page it said, edit /etc/httpd/conf.d/welcome.conf when the index page is not present. And in here it has Options -Indexes. Commenting out this line I'm now able to view the root directory, but is this advisable or should I add a new <Location Match ...> or option so it only works for mysite?
URL: http://mysite/ comes up with; I tried removing the index pages of other web-apps and the Test page come up as well. When I actually read the Test page it said, edit /etc/httpd/conf.d/welcome.conf when the index page is not present. And in here it has Options -Indexes. Commenting out this line I'm now able to view the root directory, but is this advisable or should I add a new <Location Match ...> or option so it only works for mysite?
Amahi 6, x86_64 Fedora 14, Zotac IONITX-B-E min-ITX
Nvidia Ion, Intel Atom N230 1.6GHz, DDR2 1024MB 800MHz, 1TB WD Carviar Green 7200rpm.
Nvidia Ion, Intel Atom N230 1.6GHz, DDR2 1024MB 800MHz, 1TB WD Carviar Green 7200rpm.
Re: Problem with web app indexing and PHP
i don't understand why it would be behaving different than mine.
why not use index.php though?
why not use index.php though?
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1
Who is online
Users browsing this forum: Google Adsense [Bot] and 21 guests