I can't secure my secure folder ( I can still see the content if I browse with a pc ) and the scripts doesn't work...
Any idea? A step by step guide for noobs should be great!

Thank you
Moderator: leecollings
ok something is progressing;Egregius wrote:What do you mean by 'content'? Directory listing? Put a empty index.html in.
More secure is a .htaccess file or thru the Apache virtual host file.
Code: Select all
# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/secure>
order deny,allow
Deny from All
allow from 127.0.0.1
</Directory>
#<Directory /srv/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
Yes, by this part of your virtualhosts:Mazzokun wrote:Is it secure?
Code: Select all
<Directory /var/www/secure>
order deny,allow
Deny from All
allow from 127.0.0.1
</Directory>
So the permissions are 601?Mazzokun wrote: Permission of files in secure folder are Read only owner; modify only owner;Execute ANYONE. and the owner is pi.
Code: Select all
sudo chmod 777 /var/www/secure/turnoniphone.php
Code: Select all
php turnoniphone.php
Users browsing this forum: No registered users and 1 guest