On Jul 24, 10:26 am, Craig W. [email protected] wrote:
running under a certain directory such thathttps://host.development.domain.edu/directory
1 - why not show us what your http configuration looks like…
2 - I’ve never used any designation for ‘relative_url_root’ in any of
the environment files…not sure why you would do that
3 - the links to your stylesheets & javascripts are clearly being
impacted by your ‘relative_url_root’ which seems clear is the reason
that they are not being located
Craig
My apologies in advance for the long post. At the end is the httpd
configuration.
Actually if I don’t have the relative_url_root, I still have the same
problem with the css/js files. But in addition, the RoR application
controller fails to be able to route properly.
I should mention a couple of things regarding this RoR config/app
problem:
-
I’m trying to troubleshoot this because I’m one of the RoR
programmers for the app. The admin guy is just configuring the server
and not familiar with the app. (I’m familiar with some of the server
setup stuff from other work I do.)
-
This application uses Pubcookie for authentication. This is one of
the reasons that we have used the relative_url_root, if I’m
remembering correctly. The other reason has to do with providing a
user friendly URL in the future when this app is demoed and used.
Lines 23-257 below are for making sure apache passes the pubcookie
user id along to the Rails app.
Apache Server Information
Configuration:
In file: /etc/httpd/conf/httpd.conf
44: ServerTokens OS
63: PidFile run/httpd.pid
68: Timeout 120
74: KeepAlive Off
81: MaxKeepAliveRequests 100
87: KeepAliveTimeout 15
101: StartServers 8
102: MinSpareServers 5
103: MaxSpareServers 20
104: ServerLimit 256
105: MaxClients 256
106: MaxRequestsPerChild 4000
134: Listen 80
In file: /etc/httpd/conf.d/BackupPC.conf
1: <Directory /usr/share/BackupPC/sbin/>
9: order deny,allow
10: deny from all
11: allow from 127.0.0.1
12: AuthType Basic
13: AuthUserFile /etc/BackupPC/apache.users
14: AuthName "BackupPC
16: require valid-user
:
21: Alias /BackupPC/images /usr/share/BackupPC/html/
22: ScriptAlias /BackupPC /usr/share/BackupPC/sbin/BackupPC_Admin
In file: /etc/httpd/conf.d/manual.conf
5: AliasMatch ^/manual(?:/(?:de|en|fr|ja|ko|ru))?(/.)?$ “/var/www/
manual$1”
7: <Directory “/var/www/manual”>
8: Options Indexes
9: AllowOverride None
10: Order allow,deny
11: Allow from all
:
In file: /etc/httpd/conf.d/php.conf
11: AddHandler php5-script .php
12: AddType text/html .php
18: DirectoryIndex index.php
In file: /etc/httpd/conf.d/pubcookie.conf
3: PubcookieGrantingCertFile /usr/local/pubcookie/keys/
pubcookie_granting.cert
4: PubcookieSessionCertFile /etc/pki/tls/certs/STAR_LIB_cert.pem
5: PubcookieSessionKeyFile /etc/pki/tls/private/STAR_LIB_key.pem
6: PubcookieKeyDir /usr/local/pubcookie/keys
7: PubcookieDomain .virginia.edu
8: PubcookieAuthTypeNames Pubcookie NetBadge
9: PubcookieLogin https://netbadge.virginia.edu/
12: <Directory “/”>
13: PubcookieInactiveExpire -1
:
In file: /etc/httpd/conf.d/python.conf
9: <Directory “/var/www/manual/mod/mod_python”>
10: <Files .html>
11: SetHandler default-handler
:
:
In file: /etc/httpd/conf.d/squid.conf
6: ScriptAlias /Squid/cgi-bin/cachemgr.cgi /usr/lib64/squid/
cachemgr.cgi
9: <Location /Squid/cgi-bin/cachemgr.cgi>
10: order allow,deny
11: allow from localhost.localdomain
:
In file: /etc/httpd/conf.d/ssl.conf
18: Listen 443
30: AddType application/x-x509-ca-cert .crt
31: AddType application/x-pkcs7-crl .crl
37: SSLPassPhraseDialog builtin
43: SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
44: SSLSessionCacheTimeout 300
49: SSLMutex default
61: SSLRandomSeed startup file:/dev/urandom 256
62: SSLRandomSeed connect builtin
74: SSLCryptoDevice builtin
81:
84: DocumentRoot “/var/www/html_ssl”
89: ErrorLog logs/ssl_error_log
90: TransferLog logs/ssl_access_log
91: LogLevel warn
95: SSLEngine on
100: SSLProtocol all -SSLv2
105: SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:
+LOW
112: SSLCertificateFile /etc/pki/tls/certs/STAR_LIB_cert.pem
119: SSLCertificateKeyFile /etc/pki/tls/private/STAR_LIB_key.pem
187: <Files ~ “.(cgi|shtml|phtml|php3?)$”>
188: SSLOptions +StdEnvVars
:
190: <Directory “/var/www/cgi-bin”>
191: SSLOptions +StdEnvVars
:
220: SetEnvIf User-Agent “.MSIE.” nokeepalive ssl-unclean-
shutdown downgrade-1.0 force-response-1.0
226: CustomLog logs/ssl_request_log “%t %h %{SSL_PROTOCOL}x %
{SSL_CIPHER}x "%r" %b”
229: ProxyRequests Off
230: ProxyPreserveHost On
232: <LocationMatch ^/dps/request/uva|^/dps/admin>
233: RequestHeader set X_FORWARDED_PROTO ‘https’
235: SetEnv force-proxy-request-1.0 1
236: SetEnv proxy-nokeepalive 1
237: AuthType NetBadge
238: require valid-user
239: PubcookieAppId dps
240: ProxyPassReverse http://127.0.0.1:9050
241: RewriteEngine On
242: RewriteCond %{REQUEST_FILENAME} !-f
243: RewriteCond %{REQUEST_URI} !.(js|ico|gif|jpg|png|css)$
244: RewriteRule /dps/(.) http://127.0.0.1:9050/$1 [E=RU:%
{REMOTE_USER},P,QSA,L]
245: RequestHeader add REMOTE_USER %{RU}e
:
247: <LocationMatch ^/dps>
248: RequestHeader set X_FORWARDED_PROTO ‘https’
250: SetEnv force-proxy-request-1.0 1
251: SetEnv proxy-nokeepalive 1
252: ProxyPassReverse http://127.0.0.1:9050
253: RewriteEngine On
254: RewriteCond %{REQUEST_FILENAME} !-f
255: RewriteCond %{REQUEST_URI} !.(js|ico|gif|jpg|png|css)$
256: RewriteRule /dps/(.) http://127.0.0.1:9050/$1 [E=RU:%
{REMOTE_USER},P,QSA,L]
257: RequestHeader add REMOTE_USER %{RU}e
:
:
In file: /etc/httpd/conf.d/webalizer.conf
6: Alias /usage /var/www/usage
8: <Location /usage>
9: Order deny,allow
10: Deny from all
11: Allow from 127.0.0.1
12: Allow from ::1
:
In file: /etc/httpd/conf.d/welcome.conf
7: <LocationMatch “^/+$”>
8: Options -Indexes
9: ErrorDocument 403 /error/noindex.html
:
In file: /etc/httpd/conf/httpd.conf
230: User apache
231: Group apache
250: ServerAdmin root@localhost
273: UseCanonicalName Off
280: DocumentRoot “/var/www/html”
290:
291: Options FollowSymLinks
292: AllowOverride None
:
305: <Directory “/var/www/html”>
319: Options Indexes FollowSymLinks
326: AllowOverride None
331: Order allow,deny
332: Allow from all
:
340: <Directory “/var/www/html_ssl”>
355: Options All
363: AllowOverride AuthConfig
368: Order allow,deny
369: Allow from all
:
391: UserDir disable
427: DirectoryIndex index.html index.html.var
434: AccessFileName .htaccess
440: <Files ~ “^.ht”>
441: Order allow,deny
442: Deny from all
:
449: TypesConfig /etc/mime.types
460: DefaultType text/plain
469: MIMEMagicFile conf/magic
480: HostnameLookups Off
508: ErrorLog logs/error_log
515: LogLevel warn
521: LogFormat “%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-
Agent}i"” combined
522: LogFormat “%h %l %u %t "%r" %>s %b” common
523: LogFormat “%{Referer}i → %U” referer
524: LogFormat “%{User-agent}i” agent
550: CustomLog logs/access_log combined
560: ServerSignature On
575: Alias /icons/ “/var/www/icons/”
577: <Directory “/var/www/icons”>
578: Options Indexes MultiViews FollowSymLinks
579: AllowOverride None
580: Order allow,deny
581: Allow from all
:
589: DAVLockDB /var/lib/dav/lockdb
600: ScriptAlias /cgi-bin/ “/var/www/cgi-bin/”
606: <Directory “/var/www/cgi-bin”>
607: AllowOverride None
608: Options None
609: Order allow,deny
610: Allow from all
:
628: IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable
635: AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
637: AddIconByType (TXT,/icons/text.gif) text/*
638: AddIconByType (IMG,/icons/image2.gif) image/*
639: AddIconByType (SND,/icons/sound2.gif) audio/*
640: AddIconByType (VID,/icons/movie.gif) video/*
642: AddIcon /icons/binary.gif .bin .exe
643: AddIcon /icons/binhex.gif .hqx
644: AddIcon /icons/tar.gif .tar
645: AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
646: AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
647: AddIcon /icons/a.gif .ps .ai .eps
648: AddIcon /icons/layout.gif .html .shtml .htm .pdf
649: AddIcon /icons/text.gif .txt
650: AddIcon /icons/c.gif .c
651: AddIcon /icons/p.gif .pl .py
652: AddIcon /icons/f.gif .for
653: AddIcon /icons/dvi.gif .dvi
654: AddIcon /icons/uuencoded.gif .uu
655: AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
656: AddIcon /icons/tex.gif .tex
657: AddIcon /icons/bomb.gif core
659: AddIcon /icons/back.gif …
660: AddIcon /icons/hand.right.gif README
661: AddIcon /icons/folder.gif ^^DIRECTORY^^
662: AddIcon /icons/blank.gif ^^BLANKICON^^
668: DefaultIcon /icons/unknown.gif
686: ReadmeName README.html
687: HeaderName HEADER.html
693: IndexIgnore .??* ~ # HEADER README RCS CVS *,v *,t
733: AddLanguage ca .ca
734: AddLanguage cs .cz .cs
735: AddLanguage da .dk
736: AddLanguage de .de
737: AddLanguage el .el
738: AddLanguage en .en
739: AddLanguage eo .eo
740: AddLanguage es .es
741: AddLanguage et .et
742: AddLanguage fr .fr
743: AddLanguage he .he
744: AddLanguage hr .hr
745: AddLanguage it .it
746: AddLanguage ja .ja
747: AddLanguage ko .ko
748: AddLanguage ltz .ltz
749: AddLanguage nl .nl
750: AddLanguage nn .nn
751: AddLanguage no .no
752: AddLanguage pl .po
753: AddLanguage pt .pt
754: AddLanguage pt-BR .pt-br
755: AddLanguage ru .ru
756: AddLanguage sv .sv
757: AddLanguage zh-CN .zh-cn
758: AddLanguage zh-TW .zh-tw
767: LanguagePriority en ca cs da de el eo es et fr he hr it ja ko
ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
774: ForceLanguagePriority Prefer Fallback
783: AddDefaultCharset UTF-8
803: AddType application/x-compress .Z
804: AddType application/x-gzip .gz .tgz
826: AddHandler type-map var
834: AddType text/html .shtml
835: AddOutputFilter INCLUDES .shtml
873: Alias /error/ “/var/www/error/”
877: <Directory “/var/www/error”>
878: AllowOverride None
879: Options IncludesNoExec
880: AddOutputFilter Includes html
881: AddHandler type-map var
882: Order allow,deny
883: Allow from all
884: LanguagePriority en es de fr
885: ForceLanguagePriority Prefer Fallback
:
913: BrowserMatch “Mozilla/2” nokeepalive
914: BrowserMatch “MSIE 4.0b2;” nokeepalive downgrade-1.0 force-
response-1.0
915: BrowserMatch “RealPlayer 4.0” force-response-1.0
916: BrowserMatch “Java/1.0” force-response-1.0
917: BrowserMatch “JDK/1.0” force-response-1.0
926: BrowserMatch “Microsoft Data Access Internet Publishing
Provider” redirect-carefully
927: BrowserMatch “MS FrontPage” redirect-carefully
928: BrowserMatch “^WebDrive” redirect-carefully
929: BrowserMatch “^WebDAVFS/1.[0123]” redirect-carefully
930: BrowserMatch “^gnome-vfs/1.0” redirect-carefully
931: BrowserMatch “^XML Spy” redirect-carefully
932: BrowserMatch “^Dreamweaver-WebDAV-SCM1” redirect-carefully
939: <Location /server-status>
940: SetHandler server-status
941: Order deny,allow
942: Deny from all
943: Allow from .virginia.edu
:
951: <Location /server-info>
952: SetHandler server-info
953: Order deny,allow
954: Deny from all
955: Allow from .virginia.edu
:
I’m wondering if the order of things matters in the configuration?
Thanks in advance for taking the time to look at this,
Jack