I've got Apache set up on a remote server.
Here's the contents of file /etc/apache2/sites-available/example.com.conf
:
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName example.com
ServerAlias images.example.com
DocumentRoot /home/myUserName/var/www/example.com/public_html/
ErrorLog /home/myUserName/var/www/example.com/logs/error.log
CustomLog /home/myUserName/var/www/example.com/logs/access.log combined
</VirtualHost>
I've set up the right "A" and "AAAA" records with my hosting provider. But when I go to http://images.example.com
, I get a 403 error.
Forbidden
You don't have permission to access / on this server.
Apache/2.4.7 (Ubuntu) Server at images.example.com Port 80
How do I set things up so that going to http://images.example.com
lets me see the contents of /home/myUserName/var/www/example.com/public_html/
?
Update
Contents of error.log
:
[Sun May 20 21:37:05.305775 2018] [authz_core:error] [pid 4858] [client 2601:587:5:6a70:428d:5cff:fe71:b1e4:56518] AH01630: client denied by server configuration: /home/myUserName/var/www/example.com/public_html/
[Sun May 20 21:41:15.517163 2018] [authz_core:error] [pid 4859] [client 51.38.12.23:42405] AH01630: client denied by server configuration: /home/myUserName/var/www/example.com/public_html/
[Sun May 20 21:43:49.090780 2018] [authz_core:error] [pid 4860] [client 2601:587:5:6a70:428d:5cff:fe71:b1e4:56678] AH01630: client denied by server configuration: /home/myUserName/var/www/example.com/public_html/
[Sun May 20 21:48:59.756624 2018] [authz_core:error] [pid 4861] [client 179.127.179.39:43803] AH01630: client denied by server configuration: /home/myUserName/var/www/example.com/public_html/
[Sun May 20 21:53:22.709395 2018] [authz_core:error] [pid 4864] [client 178.73.215.171:28502] AH01630: client denied by server configuration: /home/myUserName/var/www/example.com/public_html/
Running ls -la /home/myUserName/var/www/example.com/public_html/
outputs this:
total 12
drwxrwxr-x 3 myUserName myUserName 4096 May 20 22:58 .
drwxrwxr-x 4 myUserName myUserName 4096 May 20 21:32 ..
drwxr-xr-x 13 myUserName myUserName 4096 Apr 14 02:18 tile