Resolved htaccess file

kontara

New Member
Messages
4
Reaction score
0
Points
1
Hi folks, problem since conversion to Direct Admin and LightSpeed. I had looked for other solutions to the 403 Forbidden page. But I am not using PHP (its HTML4, yeah no laughs please...) and the file/folder permissions are indeed set to 644/755, respectively. OTOH, I found something in the log about Auto Index being disabled:

2020-05-26 17:47:45.595645 [INFO] [2276124] [76.232.205.207:37462#APVH_www.kondoria.x10.mx] Auto Index is disabled for [/home/kondoria/domains/kondoria.x10.mx/public_html/], access denied

How do I reenable Auto Index? Thanks.
----------------------------------------------------------


garrettroyce Community Support Community Support

In your .htaccess file (~/domains/[YOUR DOMAIN]/public_html/.htaccess) you need:

Code:
Options +Indexes
-----------------------------------------------------------

I looked into my domain folder and there is no file .htaccess in the public_html directory (domains/kondoria.x10.mx/public_html). I did find one in the wp folder below that but I am not using WordPress, just HTML. Seems like in both of my subdomains there is also a wp folder in each of them and no more other files.

Is there a way to install an .htaccess file specific to my public folder? Or would I need to reinstall from scratch? Wouldn't be the one in wp folder as that is set up already for WP. Was that conversion done under the assumption that everybody was using WordPress?

Thanks for your help.
 

spacresx

Community Advocate
Community Support
Messages
2,203
Reaction score
196
Points
63
you can create your own .htaccess file.
then add the code you need.

domains/kondoria.x10.mx/public_html/ is where you would make it.


add:

<Files .htaccess>
Order deny,allow
Deny from all
</Files>
#
Options +Indexes
DirectoryIndex index.php
IndexIgnore *


i dont use the Options +Indexes as it dont work on mine.
but you might need it with wordpress.

to stop "index of:" that people would see viewing your site,
normally it lists all of your files and folders,
IndexIgnore * hides that from showing.
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
252
Points
63
AutoIndex is almost always bad. It makes the server treat folders like special websites, but this allows filesystem snooping, which is a basic, but effective tactic to look for vulnerabilities in your website. @spacresx fixes that problem, but I think there's another problem as well.

What you need to have is a file named index.SOMETHING inside this folder. It can be index.php, index.htm, index.html, etc. If it's an extension that is not recognized by default, then we need to add it in .htaccess

Code:
DirectoryIndex index.txt index.js index.phtml index.php4 index.php5 index.SOMETHING
 

spacresx

Community Advocate
Community Support
Messages
2,203
Reaction score
196
Points
63
@garrettroyce
i was under the assumption the general rule was to have
index.htm index.html or index.php as apache/php dont
always recognize the others as the start part page of a website.

some people would list all 3 but i think its overkill,
especially if you know what page your using as a start page.
but thats just me im probably to old-school.
=)
 
Top