Cannot serve directory /home/public_html: No matching DirectoryIndex (index.html,index.php) found, and server-genera
Hi, I'm new to the forum, could you help me with this issue, thanks.
I am using a routing php file but the server sends me the following error:
Cannot serve directory /home/public_html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive.
-
Hey there! That error indicates that there is no readable index page in the directory that is specified as the document root for the domain. Normally the Apache server would expect to see an index.html or index.php file in the /home/user/public_html directory that it can read, but in your case that file is not there. The second part of the message is just letting you know that a directory listing, which can show the contents of your directory if there is no index page, has also been disabled. Let me know if that helps! 0 -
Thanks for the support, look I have the htaccess in the root of my project with these rules. Are they well defined? Options -Indexes RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.*)$ index.php?url=$1 [NC,QSA,L] 0 -
That seems like a standard .htaccess file. Is the index file also present in the directory? 0 -
That seems like a standard .htaccess file. Is the index file also present in the directory?
yes is, it0 -
That seems like a standard .htaccess file. Is the index file also present in the directory?
Yes the index also present in the directory.0 -
Is the actual error you're seeing referencing /home/public_html or /home/username/public_html? 0 -
Is the actual error you're seeing referencing /home/public_html or /home/username/public_html?
Is the actual error referencing /home/public_html0 -
Is the actual error referencing /home/public_html/myWebApp
0 -
That is likely the issue then, as that directory would not exist. cPanel expects all web content to be underneath /home/username/public_html so you may need to update your tool to check that area of the server. 0 -
That is likely the issue then, as that directory would not exist. cPanel expects all web content to be underneath /home/username/public_html so you may need to update your tool to check that area of the server.
mmm. OK thanks0 -
Alternatively, if the software really is configured at /home/public_html, that would need to be moved inside a cPanel user account area in order to be accessible on the web. 0 -
Hello, can someone help me with this ..! 1. my custom autoloader doesn't work on linux, but it does on windos. I don't use a composer 0 -
@MrDodd - we'd need some more details to be able to help. Can you get me information about the autoloader system and any error messages you're seeing? 0 -
@MrDodd - we'd need some more details to be able to help. Can you get me information about the autoloader system and any error messages you're seeing?
Hello CpRex, I'll explain what happens to me, I have a project which I develop in window 10, the project works perfectly, when I migrated it to the hosting it began to give an error due to various issues which linux does not allow. 1. The issue of upper and lower case 2. Namespaces I had to lowercase every example: (Src \ User to src \ user), now no error but autoloader not working.0 -
Hello CpRex, I'll explain what happens to me, I have a project which I develop in window 10, the project works perfectly, when I migrated it to the hosting it began to give an error due to various issues which linux does not allow. 1. The issue of upper and lower case 2. Namespaces I had to lowercase every example: (Src \ User to src \ user), now no error but autoloader not working.
this is the autoloader function autoload_once($class){ $path = str_replace('\\','/',$class.'.php'); if(!is_readable($path)) exit("Error al intentar cargar esta clase: $path"); require_once $path; } spl_autoload_register('autoload_once'); this work in windows perfectly0 -
Unfortunately I don't have much info I can provide for this. I wouldn't necessarily expect a Windows application to work well in a Linux environment, so you may need some additional development work to happen on the Linux side of things in order to get that working. 0 -
I uploaded a nextjs out file to cpanel and configured .htaccess file as follow: RewriteEngine On RewriteBase / RewriteRule ^index\.html$ " [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule . /index.html [L] . I get a 500 internal server error and in log I see: cannot serve directory /home/oxbourn1/public_html/: No matching DirectoryIndex. I don't know what to do here. 0 -
@FrankCEzene - cPanel doesn't have any support for nextjs tools, so it's not surprising that the system doesn't recognize it. Apache is still looking for an index.html or index.php file in the user's home directory in order to display content. The best information I have would be at these two links: 0
Please sign in to leave a comment.
Comments
18 comments