You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Hiep Nguyen <hi...@ee.ucr.edu> on 2007/12/06 19:54:00 UTC

[users@httpd] javascript src path on apache

hi there,

i'm not sure this is the right list to ask, if not please help direct me 
to the right list.

i have problem with path for java on my apache:

this is working just fine:
<script language="javascript" src="calendar.js" type="text/javascript"></script>

but as soon as i move calendar.js to a sub-folder includes/
<script language="javascript" src"/includes/calendar.js" 
type="text/javascript"></script>

then it's not working.

full path for include files: /var/www/html/includes/calendar.js

full path for test.php: /var/www/html/test.php

i searched "javascript src path" on google, but no good solution.

thanks.
T. Hiep

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] javascript src path on apache

Posted by Jim Albert <ji...@netrition.com>.
Hiep Nguyen wrote:
> i tried: http://10.0.0.120/calendar.js, i can save the file
> 
> but http://10.0.0.120/includes/calendar.js, i can't and get 500 internal 
> server error
> 
> so i looked into the log, this is what i got:
> [Thu Dec 06 14:09:34 2007] [alert] [client 10.0.0.128] 
> /var/www/html/includes/.htaccess: IndexIgnore not allowed here
> 
> any idea what's wrong? thanks.

Check your httpd.conf for any Directory configurations on your 
'includes' directory.

http://www.webmasterworld.com/forum92/3879.htm
http://www.howtoforge.com/forums/archive/index.php/t-788.html
seems relevant

I'm guessing you need
AllowOverride Indexes in whatever Directory configuration you have on 
your includes directory.

Or you might just want to put your IndexIgnore entry in your httpd.conf 
if you want that IndexIgnore applied throughout your site.

Just some thoughts... you'll have to decide what best to do based on how 
you are using IndexIgnore.

-- 
Jim Albert, Software Development
Netrition.com - The Internet's Premier Nutrition Superstore!
http://www.netrition.com/

---------------------------------------------------------------------
This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
information is strictly prohibited. Please note that any views or
opinions presented in this email are solely those of the author and
do not necessarily represent those of the company.
---------------------------------------------------------------------

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] javascript src path on apache

Posted by Hiep Nguyen <hi...@ee.ucr.edu>.
On Thu, 6 Dec 2007, Jim Albert wrote:

> Hiep Nguyen wrote:
>> hi there,
>> 
>> i'm not sure this is the right list to ask, if not please help direct me to 
>> the right list.
>> 
>> i have problem with path for java on my apache:
>> 
>> this is working just fine:
>> <script language="javascript" src="calendar.js" 
>> type="text/javascript"></script>
>> 
>> but as soon as i move calendar.js to a sub-folder includes/
>> <script language="javascript" src"/includes/calendar.js" 
>> type="text/javascript"></script>
>
> You are missing an = after your src attribute in your script tag above.
>
> Assuming, that was just a typo in your email, check your httpd error log when 
> you try:
> http://your_server/includes/calendar.js
>
> Any error in the log should give you a clue.
>
>> 
>> then it's not working.
>> 
>> full path for include files: /var/www/html/includes/calendar.js
>> 
>> full path for test.php: /var/www/html/test.php
>> 
>> i searched "javascript src path" on google, but no good solution.
>> 
>> thanks.
>> T. Hiep
>> 
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>> 
>
>
> -- 
> Jim Albert
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

that was my typo.

i tried: http://10.0.0.120/calendar.js, i can save the file

but http://10.0.0.120/includes/calendar.js, i can't and get 500 internal 
server error

so i looked into the log, this is what i got:
[Thu Dec 06 14:09:34 2007] [alert] [client 10.0.0.128] /var/www/html/includes/.htaccess: IndexIgnore not allowed here

any idea what's wrong? thanks.

T. Hiep

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] javascript src path on apache

Posted by Jim Albert <ji...@netrition.com>.
Hiep Nguyen wrote:
> hi there,
> 
> i'm not sure this is the right list to ask, if not please help direct me 
> to the right list.
> 
> i have problem with path for java on my apache:
> 
> this is working just fine:
> <script language="javascript" src="calendar.js" 
> type="text/javascript"></script>
> 
> but as soon as i move calendar.js to a sub-folder includes/
> <script language="javascript" src"/includes/calendar.js" 
> type="text/javascript"></script>

You are missing an = after your src attribute in your script tag above.

Assuming, that was just a typo in your email, check your httpd error log 
when you try:
http://your_server/includes/calendar.js

Any error in the log should give you a clue.

> 
> then it's not working.
> 
> full path for include files: /var/www/html/includes/calendar.js
> 
> full path for test.php: /var/www/html/test.php
> 
> i searched "javascript src path" on google, but no good solution.
> 
> thanks.
> T. Hiep
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


-- 
Jim Albert


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] javascript src path on apache

Posted by Martijn <sw...@googlemail.com>.
On Dec 6, 2007 6:54 PM, Hiep Nguyen <hi...@ee.ucr.edu> wrote:
> i have problem with path for java on my apache:

You mean JavaScript, which is something quite different from Java.

> this is working just fine:
> <script language="javascript" src="calendar.js" type="text/javascript"></script>
>
> but as soon as i move calendar.js to a sub-folder includes/
> <script language="javascript" src"/includes/calendar.js"
> type="text/javascript"></script>
>
> then it's not working.

Is the = missing in the second src on your site as well? In which
case, that's probably the problem: src="/includes/calendar.js" should
work, assuming that /var/www/html is indeed your DocumentRoot and
there isn't anything fancy happening to the location of .js files.

Martijn.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org