The question is must I configure the apache file in order to prevent listing of my php files and hence to prevent download of my php files ?
[Edited] I want the php file to be executed and produce desired web pages but the sourcecode files not to be downloaded by anyone. My php files are placed under /var/www/html in a Ubuntu On AWS EC2. Then I try to do something like: type awsec2ip/mywebsiteRootDirectory/ , if there ain't an index.html, then the server lists my php files and allow me to right-click the php files and then download them.
[not so related to question 1]Also I want to ask if I only want my android application to run some php files for dealing with the database, where should I put the php files or how should I configure the apache?
Thanks for your help and sorry for my inexperience
将其添加到您的Web根文件夹/var/www/html
.htaccess文件中:
Options -Indexes
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.