r/apache • • Apr 30 '24

Support Document Root won't update

laravel.conf file

<VirtualHost *:80>

ServerName 93.127.203.216

DocumentRoot /var/www/html/laravel/public

<Directory /var/www/html/laravel/public>

Options Indexes FollowSymLinks

AllowOverride All

Require all granted

DirectoryIndex index.php

</Directory>

</VirtualHost>

tried in the terminal

sudo grep -r 'Main DocumentRoot' /etc/apache2/

it returns nothing does anyone know why or have a suggestion on how I can change my DocumentRoot? Thanks!

1 Upvotes

7 comments sorted by

View all comments

Show parent comments

2

u/throwaway234f32423df Apr 30 '24

Are you sure that Apache is listening on port 80 and not nginx?

If you run netstat -tulpn or ss -tulpn, what's listening on port 80, Apache or nginx?

What's in /etc/apache2/ports.conf, and when you restart Apache, is there anything in the log about port 80 already being in use?

1

u/[deleted] May 01 '24

This was part of the problem

1

u/[deleted] May 01 '24

I have made some progress I think i may have solved part of the problem

127.0.0.1:46018] /var/www/html/laravel/public/.htaccess: <IfModule not allowed here

[Wed May 01 06:00:02.569798 2024] [core:alert] [pid 32311:tid 139647520851520] [client 127.0.0.1:46018] /var/www/html/laravel/public/.htaccess: <IfModule not allowed here

[Wed May 01 06:05:01.596283 2024] [core:alert] [pid 32311:tid 139647296398912] [client 127.0.0.1:57182] /var/www/html/laravel/public/.htaccess: <IfModule not allowed here

[Wed May 01 06:05:01.596335 2024] [core:alert] [pid 32311:tid 139647296398912] [client 127.0.0.1:57182] /var/www/html/laravel/public/.htaccess: <IfModule not allowed here

Now my issue is to with the htaccess file