PS. Interesting, if I navigate to https://www.nuv2.com/static/content/google6821620603f54cd0.html in the browser I get the file. I got the idea by noticing in the apache logs that asking from html had static/content in the url. Hope this gives you some guidance as to what I've done wrong!
On Friday, December 23, 2022 at 9:59:32 AM UTC-8 Bob Floyd wrote: > I tried and still get 404: > Alias /google6821620603f54cd0.html > /home/nuvroot/WWWsiteServer/static/content/google6821620603f54cd0.html > and confirmed the file is there: > ls /home/nuvroot/WWWsiteServer/static/content/google6821620603f54cd0.html > and restarted apache: > sudo /etc/init.d/apache2 restart > > If you navigate to nuv2.com you will see .ico and .jpg files in > static/content loaded correctly, so I conclude the directory is reachable. > It's only when I navigate in the browser to https:/ > nuv2.com/google6821620603f54cd0.html that I consistently get 404. It is > as if > WSGIScriptAlias / /var/www/wsgi/WWWsiteServer.wsgi > is being used to process the url (and there is no python route for it) > instead of > Alias /google6821620603f54cd0.html > /home/nuvroot/WWWsiteServer/static/content/google6821620603f54cd0.html > but that doesn't make sense as the .ico and .jpg files load (but they also > get 404 if navigated to). Something is different in asking for the files > from within html code and asking for them in the browser url. > > I see this in the error log after I enter https:/ > nuv2.com/google6821620603f54cd0.html in hte browser: > > 2022-12-23 17:56:40 > Error > 192.88.134.10 > 404 > GET /google6821620603f54cd0.html > <https://50.62.181.212/smb/file-manager/code-editor?currentDir=%2Fhttpdocs%2F&subscriptionId=1&file=google6821620603f54cd0.html&redirect=%2Fsmb%2Flog-file%2Fbrowser%2Fid%2F1> > HTTP/1.0 > > Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like > Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54 > 2.30 K > Apache SSL/TLS access > > > > > > > > > On Thursday, December 22, 2022 at 5:51:30 PM UTC-8 Graham Dumpleton wrote: > >> Did you try with: >> >> Alias /google6821620603f54cd0.html >> /home/nuvroot/WWWsiteServer/static/content/google6821620603f54cd0.html >> >> or not? >> >> I wasn't using "/home/google6821620603f54cd0.html" on the Alias line, you >> were, and I was telling you to change it to the live above. It should look >> similar to other Alias lines for other files in that directory you already >> have but you were missing the "WWWsiteServer/static/content" part of the >> path. >> >> Graham >> >> On 23 Dec 2022, at 12:45 pm, Bob Floyd <bobfl...@gmail.com> wrote: >> >> Hi Graham, >> >> $ ls -lasd /home/nuvroot >> 4 drwxr-xr-x 6 nuvroot nuvroot 4096 Dec 22 15:54 /home/nuvroot >> >> What I tried didn't work, however I'm also bit confused about your use of >> /home/google6821620603f54cd0.html on the Alias line. As that is the target >> should the google file also be located there? I don't have access above >> nuvroot! >> >> Here is the VirtualHost ( I also copied the google file to /home/nuvroot): >> >> # Highest priority >> <VirtualHost *:7080> >> >> ServerName www.nuv2.com >> >> ServerAdmin webmaster@localhost >> >> DocumentRoot /home/nuvroot/WWWsiteServer >> >> <Directory /home/nuvroot/WWWsiteServer> >> Require all granted >> </Directory> >> >> WSGIDaemonProcess nuv2.com >> python-home=/usr/local/venvs/WWWsiteServer >> WSGIProcessGroup nuv2.com >> >> WSGIApplicationGroup %{GLOBAL} >> >> WSGIScriptAlias / /var/www/wsgi/WWWsiteServer.wsgi >> >> <Directory /var/www/wsgi> >> Require all granted >> </Directory> >> >> Alias /BSIM-5-Stage-Inverter.JPG >> /home/nuvroot/WWWsiteServer/static/content/BSIM-5-Stage-Inverter.JPG >> Alias /Lease.pdf >> /home/nuvroot/WWWsiteServer/static/content/Lease.pdf >> Alias /NuV2.ico /home/nuvroot/WWWsiteServer/static/content/NuV2.ico >> Alias /favicon.ico >> /home/nuvroot/WWWsiteServer/static/content/favicon.ico >> Alias /PDF_32.png >> /home/nuvroot/WWWsiteServer/static/content/PDF_32.png >> Alias /SecureLeaseSm.JPG >> /home/nuvroot/WWWsiteServer/static/content/SecureLeaseSm.JPG >> Alias /TrademarkSmall.JPG >> /home/nuvroot/WWWsiteServer/static/content/TrademarkSmall.JPG >> Alias /UIDialog.bmp >> /home/nuvroot/WWWsiteServer/static/content/UIDialog.bmp >> # For google search ownership verification >> Alias /google6821620603f54cd0.html >> /home/nuvroot/google6821620603f54cd0.html >> # I also tried >> #Alias /google6821620603f54cd0.html /home/google6821620603f54cd0.html >> >> ErrorLog ${APACHE_LOG_DIR}/error.log >> CustomLog ${APACHE_LOG_DIR}/access.log combined >> >> </VirtualHost> >> >> Thanks, >> Bob >> On Thursday, December 22, 2022 at 2:31:19 PM UTC-8 Graham Dumpleton wrote: >> >>> You use "/home/google6821620603f54cd0.html" as the target of the URL >>> path where it should be: >>> >>> Alias /google6821620603f54cd0.html >>> /home/nuvroot/WWWsiteServer/static/content/google6821620603f54cd0.html >>> >>> based on what directory you said it was in. >>> >>> If that still doesn't work then the issue may be that the Apache user >>> doesn't have access to anything under the home directory. So it still >>> getting access error what do you get for: >>> >>> ls -lasd /home/nuvroot >>> >>> Graham >>> >>> On 23 Dec 2022, at 3:46 am, Bob Floyd <bobfl...@gmail.com> wrote: >>> >>> I put the google search HTML file (for ownership verification) in >>> static/content: >>> >>> ~/WWWsiteServer/static/content$ ls -l >>> total 244 >>> -rw-rw-r-- 1 nuvroot nuvroot 21748 Dec 6 23:53 BSIM-5-Stage-Inverter.JPG >>> -rw-rw-r-- 1 nuvroot nuvroot 89457 Dec 6 23:53 Lease.pdf >>> -rw-rw-r-- 1 nuvroot nuvroot 1078 Dec 6 23:53 NuV2.ico >>> -rw-rw-r-- 1 nuvroot nuvroot 772 Dec 6 23:53 PDF_32.png >>> -rw-rw-r-- 1 nuvroot nuvroot 27452 Dec 6 23:53 SecureLeaseSm.JPG >>> -rw-rw-r-- 1 nuvroot nuvroot 8767 Dec 6 23:53 TrademarkSmall.JPG >>> -rw-rw-r-- 1 nuvroot nuvroot 77494 Dec 6 23:53 UIDialog.bmp >>> -rw-rw-r-- 1 nuvroot nuvroot 1078 Dec 9 19:19 favicon.ico >>> -r--r--r-- 1 nuvroot root 53 Dec 22 01:06 >>> google6821620603f54cd0.html >>> >>> In my browser I enter https://www.nuv2.com/google6821620603f54cd0.html >>> as recommended by google to test for access to the file and get 404 error. >>> >>> If you navigate to nuv2.com, the other files in content are properly >>> loaded, although attempting to access any of them using a url in the >>> browser also gives 404. >>> >>> In the Apache 000-default.conf file I'm using Alias as recommended in >>> the modwsgi docs: >>> # Remap URL's for static files to where they actually are >>> Alias /BSIM-5-Stage-Inverter.JPG >>> /home/nuvroot/WWWsiteServer/static/content/BSIM-5-Stage-Inverter.JPG >>> Alias /Lease.pdf >>> /home/nuvroot/WWWsiteServer/static/content/Lease.pdf >>> Alias /NuV2.ico /home/nuvroot/WWWsiteServer/static/content/NuV2.ico >>> Alias /favicon.ico >>> /home/nuvroot/WWWsiteServer/static/content/favicon.ico >>> Alias /PDF_32.png >>> /home/nuvroot/WWWsiteServer/static/content/PDF_32.png >>> Alias /SecureLeaseSm.JPG >>> /home/nuvroot/WWWsiteServer/static/content/SecureLeaseSm.JPG >>> Alias /TrademarkSmall.JPG >>> /home/nuvroot/WWWsiteServer/static/content/TrademarkSmall.JPG >>> Alias /UIDialog.bmp >>> /home/nuvroot/WWWsiteServer/static/content/UIDialog.bmp >>> # For google search ownership verification >>> Alias /google6821620603f54cd0.html /home/google6821620603f54cd0.html >>> >>> Any suggestions how I can get access to the google html file from the >>> url? It's probably something simple but I've tried a ton of things without >>> success. >>> >>> Thanks >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "modwsgi" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to modwsgi+u...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/modwsgi/d69e7b2d-bf4f-417c-847e-0a66bd821d62n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/modwsgi/d69e7b2d-bf4f-417c-847e-0a66bd821d62n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "modwsgi" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to modwsgi+u...@googlegroups.com. >> >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/modwsgi/8b298d1b-eff8-4937-bdb5-db6eeee79479n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/modwsgi/8b298d1b-eff8-4937-bdb5-db6eeee79479n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> >> -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/2307108d-4af3-4fdb-9e92-17be5da57bdcn%40googlegroups.com.