I can't get a website running in apache with debian 11
I have a linode, with Debian 11, Apache2, Mariadb and PHP. syscon32.cl, only the Login form appears, but when entering the credentials, it does nothing, it does not advance to the Dashboard. Linode does not accept .htaccess files, reading the apache documentation, it recommends not using .htacces files, therefore I removed it, and added the .htacces data to the apache system configuration file:
This is my conf file:
<virtualhost *:80="">
ServerName syscon32.cl
ServerAlias www.syscon32.cl
ServerAdmin webmaster@servpc.cl
DocumentRoot /var/www/html/syscon32.cl/public_html</virtualhost>
RewriteCond %{SERVER_NAME} =syscon32.cl [OR]
RewriteCond %{SERVER_NAME} =www.syscon32.cl
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
<Directory /var/www/html/syscon32.cl/public_html>
Options -Indexes +FollowSymLinks
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/syscon32.cl_error.log
CustomLog ${APACHE_LOG_DIR}/syscon32.cl_access.log combined
Me pueden ayudar por favor.
1 Reply
You didn't mention what documentation you're following, but we do have a guide for setting up Apache Access Control using either htaccess
or virtual host
files.
Next, if you think there is an issue related to the documentation you're following maybe not working with your distribution, I recommend starting with our guide for setting up a LAMP stack on Debian 11, which has a section specifically about Apache for that distro.
If all of your initial configurations look correct, you can move on to the configurations that should allow the site to redirect after credentials are entered:
After doing some research, it sounds like the first step is to make sure that mod_rewrite is turned on since it looks like your configurations require that.
I'm not sure how many ways there are to accomplish this, but it looks like Apache typically uses mod_auth_form for login pages, so you may to look into that as well.
It looks like some modules are dependent on other modules, so you'll want to make sure that those are all properly configured.
Finally, if none of that helps, you can take a look at this StackOverflow discussion about a similar issue to see some of the possible causes other ran into.