apache2.txt *** port ändern anderen port einstellen in /etc/apache2/ports.conf Zeilen einfügen: NameVirtualHost *:80 -> NameVirtualHost *:8080 Listen 80 -> Listen 8080 ebenso in /etc/apache2/sites-enabled/000-default ! in router port 8080 freigeben (Virtual Server Einstellungen) *** Change the Root Directory of an Apache server ( https://www.geeksforgeeks.org/linux-unix/how-to-change-the-root-directory-of-an-apache-server/ ) config file: Ubuntu/Debian: /etc/apache2/sites-available/000-default.conf Find the DocumentRoot directive. It will look something like this: DocumentRoot /var/www/html Change the path to your desired directory. For example, if you want to change it to /home/yourusername/public_html_gfg, modify the line to: DocumentRoot /home/yourusername/gfg_html Update the section if present. You might find a section that looks like this: Options Indexes FollowSymLinks AllowOverride None Require all granted Change it to match your new DocumentRoot: Options Indexes FollowSymLinks AllowOverride None Require all granted Step 3: Update Permissions Make sure the Apache user (normally www-data or apache) has the read permission on the new directory. You can adjust the permissions using:You can adjust the permissions using: sudo chown -R www-data:www-data /home/yourusername/gfg_html sudo chmod -R 755 /home/yourusername/gfg_html Step 4: Test the Configuration It is a good idea to check the settings for syntax issues before restarting Apache: sudo apachectl configtest Step 5: Restart Apache Restart Apache to apply the changes: $ sudo service apache2 restart Step 6: Verify the Change To test the effectiveness of changing the root directory, open your web browser and enter your server’s IP address/domain name. You should see the content from the new DocumentRoot directory you created.