Tags:
create new tag
view all tags

SID-01872: Images not loading...getting 404 errors on static content

Status: Answered Answered TWiki version: 6.0.0 Perl version: 5.008
Category: CategoryInstallation Server OS: red hat linux 5 Last update: 11 years ago

I don't seem to be able to get a functional /do scriptalias working that will also load content which is in <home>/twiki/pub

here are my aliases including one I added to no avail.

Alias /do/TWiki/ "/opt/was/archwiki/twiki/pub/TWiki"
ScriptAlias /do "/opt/was/archwiki/twiki/bin"
Alias /pub "/opt/was/archwiki/twiki/pub"

here are errors from access and error logs

Access Log example
20.20.192.174 - - [14/Feb/2014:11:08:43 -0500] 0 "GET /do/TWiki/JQueryPlugin/jquery-all.js HTTP/1.1" 404 233
20.20.192.174 - - [14/Feb/2014:11:08:43 -0500] 0 "GET /do/TWiki/PatternSkin/style.css HTTP/1.1" 404 228
20.20.192.174 - - [14/Feb/2014:11:08:43 -0500] 0 "GET /do/TWiki/PatternSkin/colors.css HTTP/1.1" 404 229
20.20.192.174 - - [14/Feb/2014:11:08:43 -0500] 0 "GET /do/TWiki/PatternSkin/print.css HTTP/1.1" 404 228
20.20.192.174 - - [14/Feb/2014:11:08:42 -0500] 0 "GET /do/view/TWiki/WebHome HTTP/1.1" 200 41889

Error Log example
[Fri Feb 14 11:01:33.041442 2014] [authz_core:debug] [pid 15142:tid 2199154243920] mod_authz_core.c(802): [client 20.20.192.174:65303] AH01626: authorization result of <RequireAny>: granted, referer: http://enysvzalb025/do/view/TWiki/WebHome
[Fri Feb 14 11:01:33.041466 2014] [cgid:error] [pid 15142:tid 2199154243920] [client 20.20.192.174:65303] AH01264: script not found or unable to stat: /opt/was/archwiki/twiki/bin/TWiki, referer: http://enysvzalb025/do/view/TWiki/WebHome

I used the apache twiki.conf generator to get this far....

Any suggestions please? my /do/configure html is attached

-- Richard Floyd - 2014-02-14

Discussion and Answer

Don't mix TWiki's bin and pub in your Apache configuration. Use /do URL path for the TWiki bin, and /pub URL path for the TWiki pub.

-- Peter Thoeny - 2014-02-14

I'm using the distribution libraries they way they were expanded from the .tar file.

the log files below were generated with:

ScriptAlias /do "/opt/was/archwiki/twiki/bin"

# The Alias defines a url that points to the twiki pub directory, which
# is the root of file attachment
Alias /pub "/opt/was/archwiki/twiki/pub"

So I believe the /do is causeing the /view to be included in what should be the /pub call

I'm not sure what the perl script view is doing but it appears not to work

So .... what should my ScriptAlias and Alias be? and/or what else do I need to do?

20.20.192.174 - - [14/Feb/2014:18:08:35 -0500] 0 "GET /do/TWiki/TopMenuSkin/spacer.gif HTTP/1.1" 404 229
20.20.192.174 - - [14/Feb/2014:18:08:35 -0500] 0 "GET /do/TWiki/TWikiLogos/T-badge-88x31.gif HTTP/1.1" 404 235
20.20.192.174 - - [14/Feb/2014:18:08:35 -0500] 0 "GET /do/TWiki/TopMenuSkin/menu-gray-bg.png HTTP/1.1" 404 235
20.20.192.174 - - [14/Feb/2014:18:08:35 -0500] 0 "GET /do/TWiki/TWikiLogos/perl-logo-88x31.gif HTTP/1.1" 404 237
20.20.192.174 - - [14/Feb/2014:18:08:35 -0500] 0 "GET /do/TWiki/TopMenuSkin/menu-pulldown-bg.png HTTP/1.1" 404 239
20.20.192.174 - - [14/Feb/2014:18:08:35 -0500] 0 "GET /do/TWiki/TopMenuSkin/banner-bg.png HTTP/1.1" 404 232
20.20.192.174 - - [14/Feb/2014:18:08:35 -0500] 0 "GET /do/TWiki/TopMenuSkin/banner-net-bg.png HTTP/1.1" 404 236
20.20.192.174 - - [14/Feb/2014:18:08:35 -0500] 0 "GET /do/TWiki/TopMenuSkin/action-button-area.gif HTTP/1.1" 404 241
20.20.192.174 - - [14/Feb/2014:18:08:35 -0500] 0 "GET /do/TWiki/TopMenuSkin/button-round-disabled.gif HTTP/1.1" 404 244
20.20.192.174 - - [14/Feb/2014:18:08:35 -0500] 0 "GET /do/TWiki/ScrollBoxAddOn/gradient-title.png HTTP/1.1" 404 240
20.20.192.174 - - [14/Feb/2014:18:08:35 -0500] 0 "GET /do/TWiki/TopMenuSkin/button-round-normal.gif HTTP/1.1" 404 242
20.20.192.174 - - [14/Feb/2014:18:08:36 -0500] 0 "GET /do/TWiki/TopMenuSkin/menu-reverse-bg.png HTTP/1.1" 404 238
[root@enysvzalb025 /opt/was/archwiki/arch/logs]# tail -10 errorLog.2014-02-14-23_08_27
[Fri Feb 14 18:08:35.406343 2014] [cgid:error] [pid 17909:tid 2199112300880] [client 20.20.192.174:53211] AH01264: script not found or unable to stat: /opt/was/archwiki/twiki/bin/TWiki, referer: http://enysvzalb025/do/view/TWiki/WebHome
[Fri Feb 14 18:08:35.411242 2014] [authz_core:debug] [pid 17909:tid 2199122786640] mod_authz_core.c(802): [client 20.20.192.174:53209] AH01626: authorization result of Require all granted: granted, referer: http://enysvzalb025/do/view/TWiki/WebHome
[Fri Feb 14 18:08:35.411253 2014] [authz_core:debug] [pid 17909:tid 2199122786640] mod_authz_core.c(802): [client 20.20.192.174:53209] AH01626: authorization result of <RequireAny>: granted, referer: http://enysvzalb025/do/view/TWiki/WebHome
[Fri Feb 14 18:08:35.411260 2014] [cgid:error] [pid 17909:tid 2199122786640] [client 20.20.192.174:53209] AH01264: script not found or unable to stat: /opt/was/archwiki/twiki/bin/TWiki, referer: http://enysvzalb025/do/view/TWiki/WebHome
[Fri Feb 14 18:08:35.411353 2014] [authz_core:debug] [pid 17909:tid 2199122786640] mod_authz_core.c(802): [client 20.20.192.174:53213] AH01626: authorization result of Require all granted: granted, referer: http://enysvzalb025/do/view/TWiki/WebHome
[Fri Feb 14 18:08:35.411362 2014] [authz_core:debug] [pid 17909:tid 2199122786640] mod_authz_core.c(802): [client 20.20.192.174:53213] AH01626: authorization result of <RequireAny>: granted, referer: http://enysvzalb025/do/view/TWiki/WebHome
[Fri Feb 14 18:08:35.411370 2014] [cgid:error] [pid 17909:tid 2199122786640] [client 20.20.192.174:53213] AH01264: script not found or unable to stat: /opt/was/archwiki/twiki/bin/TWiki, referer: http://enysvzalb025/do/view/TWiki/WebHome
[Fri Feb 14 18:08:36.775084 2014] [authz_core:debug] [pid 17909:tid 2199143758160] mod_authz_core.c(802): [client 20.20.192.174:53213] AH01626: authorization result of Require all granted: granted, referer: http://enysvzalb025/do/view/TWiki/WebHome
[Fri Feb 14 18:08:36.775115 2014] [authz_core:debug] [pid 17909:tid 2199143758160] mod_authz_core.c(802): [client 20.20.192.174:53213] AH01626: authorization result of <RequireAny>: granted, referer: http://enysvzalb025/do/view/TWiki/WebHome
[Fri Feb 14 18:08:36.775141 2014] [cgid:error] [pid 17909:tid 2199143758160] [client 20.20.192.174:53213] AH01264: script not found or unable to stat: /opt/was/archwiki/twiki/bin/TWiki, referer: http://enysvzalb025/do/view/TWiki/WebHome

-- Richard Floyd - 2014-02-14

Use ApacheConfigGenerator

-- Peter Thoeny - 2014-02-15

Actually the problem was in the configurator. The name of the alias for the script directory was /do which is right BUT, the name of the alias for the pub directory was also /do . So....we saw the misdirected static content which was trying to be loaded from <twiki> /bin/view

-- Richard Floyd - 2014-02-18

I just checked, the ApacheConfigGenerator shows /pub for pub alias as it should be.

-- Peter Thoeny - 2014-02-20

twiki view page images are not displayed. I have generated my apache config file using ApacheConfigGenerator.

-- Sachin Vaidya - 2015-08-20

If images are not shown it means that the twiki/pub directory is not exposed as a document root directory by Apache.

In the twiki.conf Apache config file for TWiki make sure the alias is set properly, such as:

Alias /pub "/var/www/twiki/pub"

...and that the <Directory "/var/www/twiki/pub"> directive has the proper settings as per ApacheConfigGenerator.

Make sure PubUrlPath and PubDir are set properly in TWiki's configure, such as:

$TWiki::cfg{PubUrlPath} = '/p/pub';
$TWiki::cfg{PubDir} = '/var/www/twiki/pub';

Also, please do not cross-post questions.

-- Peter Thoeny - 2015-08-24

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Images not loading...getting 404 errors on static content
SupportCategory CategoryInstallation
TWiki version 6.0.0
Server OS red hat linux 5
Web server apache 2.4.7
Perl version 5.008
Browser & version Chrome v32.7.13
Topic attachments
I Attachment History Action Size Date Who Comment
HTMLhtml TWiki_Configuration.html r1 manage 209.3 K 2014-02-14 - 16:40 UnknownUser  
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2015-08-24 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.