I followed this guide on installing and using apache, and changed the conf files so that it would serve my project which is located in /home/user/Desktop/app/src/.
The index.php itself is in the php/ folder.
Here are the conf files that I have for this project
/etc/apache2/sites-available/chatapp.conf:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName chatapp
ServerAlias www.chatapp
DocumentRoot /home/user/Desktop/RT_chatapp/src/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
/etc/apache2/apache2.conf:
<Directory />
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
DirectoryIndex index.php index.html
Require all granted
</Directory>
I am running php 8.2.5 and apache 2.4.41 ps I thought it might be worth mentioning that I am pretty new to web servers using apache and such
I tried adding "index.php" to the directoryIndex as well as modifying the document root to /home/user/Desktop/RT_chatapp/src/php/ instead but that didn't work.