I am setting up a subdomain - subdomain.example.com for my existing example.com to serve application with distinct origin
Using DNS manager of my registrar, DNS Manager:
type CNAME, name: subdomain, points to @
And in my Apache 2.4 sites-available I have the existing example.com.confand example.com-ssl.conf
so I made a new vhost for my subdomain, subdomain.example.com.conf and subdomain.example.com-ssl.conf
<VirtualHost *:80>
DocumentRoot "/var/www/subdomain/public_html"
ServerName subdomain.example.com
<Directory /var/www/subdomain/public_html>
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
LogLevel trace5
ErrorLog ${APACHE_LOG_DIR}/subdomain-error.log
CustomLog ${APACHE_LOG_DIR}/subdomain-access.log combined
</VirtualHost>
Server Folders:
/var/www/subdomain/public_html
/var/www/subdomain/public_html/icons
If I browse to subdomain URL, it works fine:
http://subdomain.example.com
works
Now if I browse to any subdirectory content, it returns 404:
http://subdomain.example.com/icons/icon.png
Not Found The requested URL was not found on this server.
subdomain-error.log error:
AH00128: File does not exist: /usr/share/apache2/icons/icon.png
What am I doing wrong? Or there is an something else causing this?