Multiple version of PHP on different Virtual Hosts

My virtual host:

<VirtualHost *:80>
    ServerAdmin my.mail@gmail.com
    DocumentRoot "/home/domenico/www/wabbot"
    ServerName wabbot.test
    ServerAlias wabbot.test
    ErrorLog "/var/log/httpd/wabbot.test-error_log"
    CustomLog "/var/log/httpd/wabbot.test-access_log" common

    <Directory "/home/domenico/www/wabbot">
        Require all granted
    </Directory>
</VirtualHost>

Thes links (in no particular order) are as good as any to get you started.

All found within a minute spent with DuckDuckGo search. Enjoy.

You probably want that port to be:

<VirtualHost *:8080>

… or:

<VirtualHost *:8888>

… but, definitely not:

<VirtualHost *:80>

Have fun, kiddies. (Bows out)

I haven’t found any solutions around the internet and in the links posted, should I give up? Anyone who can resolve this issue?

Also localhost return 403 now, only phpmyadmin works…

Read first this: https://www.makeuseof.com/tag/chmod-command-linux-file-permissions/

What means 755 and what means 644? Why is 755 or 775 needed here?

First → User
Second → Group
Third → Other

0: No permission
1: Execute
2: Write
3: Write and execute
4: Read
5: Read and execute
6: Read and write
7: Read, write, and execute

Why is it good that other than http cannot write files?

1 Like

My 2 cents about cerificates

Works perfectly for me. Has to be renewed every couple of months, there are scripts for that.

And start doing your research, because with something like 777 on the wwwroot you will be hacked in no time (there are actually exceptions to that, but they are for grown ups so forget 777 for now).
For test purposes be sure to be behind router or enable firewall so that the test site is not accessible from the web in case of a collosal error like 777 :slight_smile:

2 Likes

I knew the meaning of chmod, but with 775 the user I use to log in asks me for the password for those folders, can I add it as belonging to that folder?

Then you have access, since you are part of the http group.