Static image service implementation - PHP, JS and HTML technology
P粉990568283
2023-08-13 14:24:45
<p>Good morning. </p>
<p>I know nothing about HTML, CSS, PHP or HTML, but for some reason I managed to put together a website. </p>
<p>The website queries a mysql database, loads Google Maps, and displays a marker on the queried address. </p>
<p>I have correctly written the Python code to crawl the data, and the data in the SQL database has been entered and formatted correctly. </p>
<p>I have custom icons to display markers, these icons are located in /icons/1.png etc</p>
<pre class="brush:php;toolbar:false;">var icons = {
'1': '/icons/1.png',
'2': '/icons/2.png',
'3': 'icons/3.png',
'4': 'icons/4.png'
}</pre>
<p>When I load the page, the markup doesn't appear. If I go to the http://blah.co.uk/icons page I get a 404 error</p>
<p>File and folder permissions are </p>
<pre class="brush:php;toolbar:false;">-rw-r--r-- 1 http_user_1 www-data 1779 Aug 12 10:07 contact.html
-rw-r--r-- 1 http_user_1 www-data 3993 Aug 12 10:06 expired.php
-rwxr-x--- 1 http_user_1 www-data 842 Aug 12 10:27 fetch_addresses.php
drwxr-xr-x 2 http_user_1 www-data 4096 Aug 12 10:09 icons
drwxrwxr-x 2 http_user_1 www-data 4096 Aug 12 10:09 images
-rwxr-x--- 1 http_user_1 www-data 6243 Aug 12 10:39 index.php</pre>
<p>In the virtual host file I have the following. </p>
<pre class="brush:php;toolbar:false;">Alias /icons "/var/www/blah.co.uk/public_html/icons"
<Directory "/var/www/blah.co.uk/public_html/icons">
options MultiViews
AllowOverride None
Require all granted
</Directory></pre>
<p>Under Firefox Developer Options, I get the following error</p>
<blockquote>
<p>GET
https://www.blah.co.uk/icons/3.png
[HTTP/1.1 404 Not Found 18ms]</p>
</blockquote>
<p>URL not found error when accessing blah.co.uk/icons</p>
<p>Any ideas where to look? </p>
The complete path is /var/www/html/blah.co.uk/public_html instead of /var/www/blah.co.uk/public_html