Sponsored Content
Full Discussion: Apache
Top Forums UNIX for Dummies Questions & Answers Apache Post 5784 by Neo on Wednesday 22nd of August 2001 07:22:20 PM
Old 08-22-2001
This error is caused when you try to open a directory and the default configuation for apache is to open a file such as index.htm, index.html, default.htm, or default.html. If these files do not exist, you will get a permissions / failure error.

These are lots of 'gotchas' like this using something as powerful as the Apache web-server. I agree with Optimus that reading the book or on-line documentation would help you accomplish your goals much faster.

Here is a link to the book Optimus recommends, at Amazon:

http://www.amazon.com/exec/obidos/AS...89/silkroadcom
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Apache!

How do you tell which apache version is currently running. the situation is that I got multiply httpd.conf files on a solaris 2.6 server and I need to tell which version is what? I have checked the httpd.conf but no joy Thanks in Advance (3 Replies)
Discussion started by: hassan2
3 Replies

2. IP Networking

Apache

I want to have multiple domains to be configured in apache web server on redhat linux Please help me Vijay (2 Replies)
Discussion started by: Vijayanand
2 Replies

3. IP Networking

Apache

I want to have multiple domains to be configured in apache web server on redhat linux can i have that without DNS server configured. What all i have to do for that.What all to configure ? And importantly i want the site be accessed by name rather IP address. Please help me ... (1 Reply)
Discussion started by: Vijayanand
1 Replies

4. IP Networking

Apache

I want to have multiple domains to be configured in apache web server on redhat linux can i have that without DNS server being configured. What all i have to do for that.What all to configure ? please note that i need to access the site by its name not by IP . I want this in a LAN . I dont... (4 Replies)
Discussion started by: Vijayanand
4 Replies

5. UNIX for Dummies Questions & Answers

apache

on my webserver, and im sure many of you who also run one see this all the time, but the majority of my access log is filled with attempted exploits from computers compromised by some virus (NIMBDA?) and anyway i know this is harmless to an apache/linux webserver, but its annoying, anyway, on... (5 Replies)
Discussion started by: norsk hedensk
5 Replies

6. UNIX for Advanced & Expert Users

Apache

I am tring to configure Apache so that it displays the ip address of users browsing the web in the header. mod_header is installed on my apache as default. I tried including the following in httpd.conf file but no joy Header set remoteip %{REMOTE_ADDR} I have also tried Header add... (3 Replies)
Discussion started by: hassan2
3 Replies

7. UNIX for Dummies Questions & Answers

Apache help

Hi, I am new to unix and am trying to determine if apache is installed on my server. Is there a command to determine the running version or if it is even installed. I appreciate your help. Thanks, Eric (2 Replies)
Discussion started by: ejbrever
2 Replies

8. Web Development

Apache module development on apache 2.2

Hi, I'm new to developing modules for Apache. I understand the basics now and can develop something simple which allows a 'GET' request to happen, but what I want to do is actually 'POST' information to my site. I know the basic POST Request works and I can see that it is post by looking at... (2 Replies)
Discussion started by: fishman2001
2 Replies

9. Red Hat

Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-la

Have no idea on what the below error message is: Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher -buildfile build.xml dist. Any help? (3 Replies)
Discussion started by: gull05
3 Replies
LinkExtractor(3pm)					User Contributed Perl Documentation					LinkExtractor(3pm)

NAME
HTML::LinkExtractor - Extract links from an HTML document DESCRIPTION
HTML::LinkExtractor is used for extracting links from HTML. It is very similar to HTML::LinkExtor, except that besides getting the URL, you also get the link-text. Example ( please run the examples ): use HTML::LinkExtractor; use Data::Dumper; my $input = q{If <a href="http://perl.com/"> I am a LINK!!! </a>}; my $LX = new HTML::LinkExtractor(); $LX->parse($input); print Dumper($LX->links); __END__ # the above example will yield $VAR1 = [ { '_TEXT' => '<a href="http://perl.com/"> I am a LINK!!! </a>', 'href' => bless(do{(my $o = 'http://perl.com/')}, 'URI::http'), 'tag' => 'a' } ]; "HTML::LinkExtractor" will also correctly extract nested link-type tags. SYNOPSIS
## the demo perl LinkExtractor.pm perl LinkExtractor.pm file.html othefile.html ## or if the module is installed, but you don't know where perl -MHTML::LinkExtractor -e" system $^X, $INC{q{HTML/LinkExtractor.pm}} " perl -MHTML::LinkExtractor -e' system $^X, $INC{q{HTML/LinkExtractor.pm}} ' ## or use HTML::LinkExtractor; use LWP qw( get ); # use LWP::Simple qw( get ); my $base = 'http://search.cpan.org'; my $html = get($base.'/recent'); my $LX = new HTML::LinkExtractor(); $LX->parse($html); print qq{<base href="$base"> }; for my $Link( @{ $LX->links } ) { ## new modules are linked by /author/NAME/Dist if( $$Link{href}=~ m{^/author/w+} ) { print $$Link{_TEXT}." "; } } undef $LX; __END__ ## or use HTML::LinkExtractor; use Data::Dumper; my $input = q{If <a href="http://perl.com/"> I am a LINK!!! </a>}; my $LX = new HTML::LinkExtractor( sub { print Data::Dumper::Dumper(@_); }, 'http://perlFox.org/', ); $LX->parse($input); $LX->strip(1); $LX->parse($input); __END__ #### Calculate to total size of a web-page #### adds up the sizes of all the images and stylesheets and stuff use strict; use LWP; # use LWP::Simple; use HTML::LinkExtractor; # my $url = shift || 'http://www.google.com'; my $html = get($url); my $Total = length $html; # print "initial size $Total "; # my $LX = new HTML::LinkExtractor( sub { my( $X, $tag ) = @_; # unless( grep {$_ eq $tag->{tag} } @HTML::LinkExtractor::TAGS_IN_NEED ) { # print "$$tag{tag} "; # for my $urlAttr ( @{$HTML::LinkExtractor::TAGS{$$tag{tag}}} ) { if( exists $$tag{$urlAttr} ) { my $size = (head( $$tag{$urlAttr} ))[1]; $Total += $size if $size; print "adding $size " if $size; } } } }, $url, 0 ); # $LX->parse($html); # print "The total size of $url is $Total bytes "; __END__ METHODS
"$LX->new([&callback, [$baseUrl, [1]]])" Accepts 3 arguments, all of which are optional. If for example you want to pass a $baseUrl, but don't want to have a callback invoked, just put "undef" in place of a subref. This is the only class method. 1. a callback ( a sub reference, as in "sub{}", or "&sub") which is to be called each time a new LINK is encountered ( for @HTML::LinkExtractor::TAGS_IN_NEED this means after the closing tag is encountered ) The callback receives an object reference($LX) and a link hashref. 2. and a base URL ( URI->new, so its up to you to make sure it's valid which is used to convert all relative URI's to absolute ones. $ALinkP{href} = URI->new_abs( $ALink{href}, $base ); 3. A "boolean" (just stick with 1). See the example in "DESCRIPTION". Normally, you'd get back _TEXT that looks like '_TEXT' => '<a href="http://perl.com/"> I am a LINK!!! </a>', If you turn this option on, you'll get the following instead '_TEXT' => ' I am a LINK!!! ', The private utility function "_stripHTML" does this by using HTML::TokeParsers method get_trimmed_text. You can turn this feature on an off by using "$LX->strip(undef || 0 || 1)" "$LX->parse( $filename || *FILEHANDLE || $FileContent )" Each time you call "parse", you should pass it a $filename a *FILEHANDLE or a "$FileContent" Each time you call "parse" a new "HTML::TokeParser" object is created and stored in "$this->{_tp}". You shouldn't need to mess with the TokeParser object. "$LX->links()" Only after you call "parse" will this method return anything. This method returns a reference to an ArrayOfHashes, which basically looks like (Data::Dumper output) $VAR1 = [ { tag => 'img', src => 'image.png' }, ]; Please note that if yo provide a callback this array will be empty. "$LX->strip( [ 0 || 1 ])" If you pass in "undef" (or nothing), returns the state of the option. Passing in a true or false value sets the option. If you wanna know what the option does see "$LX->new([&callback, [$baseUrl, [1]]])" WHAT'S A LINK-type tag Take a look at %HTML::LinkExtractor::TAGS to see what I consider to be link-type-tag. Take a look at @HTML::LinkExtractor::VALID_URL_ATTRIBUTES to see all the possible tag attributes which can contain URI's (the links!!) Take a look at @HTML::LinkExtractor::TAGS_IN_NEED to see the tags for which the '_TEXT' attribute is provided, like "<a href="#"> TEST </a>" How can that be?!?! I took at look at %HTML::Tagset::linkElements and the following URL's http://www.blooberry.com/indexdot/html/tagindex/all.htm http://www.blooberry.com/indexdot/html/tagpages/a/a-hyperlink.htm http://www.blooberry.com/indexdot/html/tagpages/a/applet.htm http://www.blooberry.com/indexdot/html/tagpages/a/area.htm http://www.blooberry.com/indexdot/html/tagpages/b/base.htm http://www.blooberry.com/indexdot/html/tagpages/b/bgsound.htm http://www.blooberry.com/indexdot/html/tagpages/d/del.htm http://www.blooberry.com/indexdot/html/tagpages/d/div.htm http://www.blooberry.com/indexdot/html/tagpages/e/embed.htm http://www.blooberry.com/indexdot/html/tagpages/f/frame.htm http://www.blooberry.com/indexdot/html/tagpages/i/ins.htm http://www.blooberry.com/indexdot/html/tagpages/i/image.htm http://www.blooberry.com/indexdot/html/tagpages/i/iframe.htm http://www.blooberry.com/indexdot/html/tagpages/i/ilayer.htm http://www.blooberry.com/indexdot/html/tagpages/i/inputimage.htm http://www.blooberry.com/indexdot/html/tagpages/l/layer.htm http://www.blooberry.com/indexdot/html/tagpages/l/link.htm http://www.blooberry.com/indexdot/html/tagpages/o/object.htm http://www.blooberry.com/indexdot/html/tagpages/q/q.htm http://www.blooberry.com/indexdot/html/tagpages/s/script.htm http://www.blooberry.com/indexdot/html/tagpages/s/sound.htm And the special cases <!DOCTYPE HTML SYSTEM "http://www.w3.org/DTD/HTML4-strict.dtd"> http://www.blooberry.com/indexdot/html/tagpages/d/doctype.htm '!doctype' is really a process instruction, but is still listed in %TAGS with 'url' as the attribute and <meta HTTP-EQUIV="Refresh" CONTENT="5; URL=http://www.foo.com/foo.html"> http://www.blooberry.com/indexdot/html/tagpages/m/meta.htm If there is a valid url, 'url' is set as the attribute. The meta tag has no 'attributes' listed in %TAGS. SEE ALSO
HTML::LinkExtor, HTML::TokeParser, HTML::Tagset. AUTHOR
D.H (PodMaster) Please use http://rt.cpan.org/ to report bugs. Just go to http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-Scrubber to see a bug list and/or repot new ones. LICENSE
Copyright (c) 2003, 2004 by D.H. (PodMaster). All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license. perl v5.10.1 2005-01-07 LinkExtractor(3pm)
All times are GMT -4. The time now is 09:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy