[olug] Apache

Jay Bendon jaybocc2 at gmail.com
Wed Oct 24 15:22:04 UTC 2012


First of all you're still using perl...

heres an example config i have used in the past for CGI(PERL).

<VirtualHost $ipaddr>
  ServerName $primary
  $aliasblock

  ServerAdmin $contact

  DocumentRoot /home/$primary/public_html

  <Directory /home/$primary/public_html>
    Options Indexes FollowSymLinks MultiViews +IncludesNOEXEC
    AllowOverride None
    Order allow,deny
    allow from all
  </Directory>

  ErrorLog /var/log/httpd/$primary-error_log
  TransferLog /var/log/httpd/$primary-access_log

  ScriptAlias /cgi-bin/ /home/$primary/cgi-bin/
  ScriptAlias /helloworld /home/master/cgi-bin/helloworld/helloworld.cgi
  ScriptAlias /admin /home/master/cgi-bin/admin/admin.cgi

  AddType text/html .shtml
  AddOutputFilter INCLUDES .shtml

  <Directory "/home/$primary/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AddHandler cgi-script .cgi
    Order allow,deny
    Allow from all
  </Directory>

</VirtualHost>

You already have mod_cgi enabled so this config should work for you.  You
can change the extensions if you want from .cgi to .pl

--Jay


On Wed, Oct 24, 2012 at 10:13 AM, Sam Flint <harmonicnm7h at gmail.com> wrote:

> Very funny, it's a computer program, it doesn't work that way.  I will
> repost it.  NO, I will not go back to the default, it's bloated, and
> doesn't do Vhosts without digging through comments, and commenting
> other lines out.
>
> here is the config:
> User apache
> Group apache
> Listen 80
>
> LoadModule auth_basic_module modules/mod_auth_basic.so
> LoadModule auth_digest_module modules/mod_auth_digest.so
> LoadModule authn_file_module modules/mod_authn_file.so
> LoadModule authn_alias_module modules/mod_authn_alias.so
> LoadModule authn_anon_module modules/mod_authn_anon.so
> LoadModule authn_dbm_module modules/mod_authn_dbm.so
> LoadModule authn_default_module modules/mod_authn_default.so
> LoadModule authz_host_module modules/mod_authz_host.so
> LoadModule authz_user_module modules/mod_authz_user.so
> LoadModule authz_owner_module modules/mod_authz_owner.so
> LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
> LoadModule authz_dbm_module modules/mod_authz_dbm.so
> LoadModule authz_default_module modules/mod_authz_default.so
> LoadModule ldap_module modules/mod_ldap.so
> LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
> LoadModule include_module modules/mod_include.so
> LoadModule log_config_module modules/mod_log_config.so
> LoadModule logio_module modules/mod_logio.so
> LoadModule env_module modules/mod_env.so
> LoadModule ext_filter_module modules/mod_ext_filter.so
> LoadModule mime_magic_module modules/mod_mime_magic.so
> LoadModule expires_module modules/mod_expires.so
> LoadModule deflate_module modules/mod_deflate.so
> LoadModule headers_module modules/mod_headers.so
> LoadModule usertrack_module modules/mod_usertrack.so
> LoadModule setenvif_module modules/mod_setenvif.so
> LoadModule mime_module modules/mod_mime.so
> LoadModule dav_module modules/mod_dav.so
> LoadModule status_module modules/mod_status.so
> LoadModule autoindex_module modules/mod_autoindex.so
> LoadModule info_module modules/mod_info.so
> LoadModule dav_fs_module modules/mod_dav_fs.so
> LoadModule vhost_alias_module modules/mod_vhost_alias.so
> LoadModule negotiation_module modules/mod_negotiation.so
> LoadModule dir_module modules/mod_dir.so
> LoadModule actions_module modules/mod_actions.so
> LoadModule speling_module modules/mod_speling.so
> LoadModule userdir_module modules/mod_userdir.so
> LoadModule alias_module modules/mod_alias.so
> LoadModule substitute_module modules/mod_substitute.so
> LoadModule rewrite_module modules/mod_rewrite.so
> LoadModule proxy_module modules/mod_proxy.so
> LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
> LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
> LoadModule proxy_http_module modules/mod_proxy_http.so
> LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
> LoadModule proxy_connect_module modules/mod_proxy_connect.so
> LoadModule cache_module modules/mod_cache.so
> LoadModule suexec_module modules/mod_suexec.so
> LoadModule disk_cache_module modules/mod_disk_cache.so
> LoadModule cgi_module modules/mod_cgi.so
> LoadModule version_module modules/mod_version.so
>
>
> NameVirtualHost *:80
>
> <VirtualHost *:80>
>              ServerName flintfam.org
>              ServerAlias flintfam.org *.flintfam.org *.flintfam.net *
> flintfam.info
>              DocumentRoot /var/apache/flintfam.org/
>              Include conf.d/perl.conf
>              SetHandler perl-script
>              PerlResponseHandler ModPerl::Registry
>              <Directory "/var/apache/flintfam.org">
>                         Options +ExecCGI
>                         Order allow,deny
>                         Allow from all
>              </Directory>
>              <Directory "/var/apache/flintfam.org/wiki">
>                         Options +ExecCGI
>                         DirectoryIndex wiki.pl
>                         Order allow,deny
>                         Allow from all
>              </Directory>
>              Options +ExecCGI
>              UserDir pub_html
>              UserDir enabled swflint kjflint wkflint
> </VirtualHost>
> End config
>
> Sam
>
> On Wed, Oct 24, 2012 at 9:36 AM, Kevin <sharpestmarble at gmail.com> wrote:
> > Not without seeing the file. But what I'd do is to revert to an out of
> the
> > box config, test that, then slowly apply one config change after another,
> > testing between each one. Sooner or later you'll hit upon one that breaks
> > it and then you'll know much better why your config hates you.
> > On Oct 24, 2012 9:33 AM, "Sam Flint" <harmonicnm7h at gmail.com> wrote:
> >
> >> Does anyone have any idea of why my config hates me?
> >>
> >> On Sat, Oct 20, 2012 at 2:13 PM, Sam Flint <harmonicnm7h at gmail.com>
> wrote:
> >> > I'll just post the whole thing.
> >> >
> >> > Sam
> >> >
> >> > On Sat, Oct 20, 2012 at 1:24 PM, Kevin <sharpestmarble at gmail.com>
> wrote:
> >> >> Can you post the section of your config file where you define your
> >> >> vhost? It sounds like you have an incorrect statement there that's
> >> >> resulting in the 404 error.
> >> >>
> >> >> On Sat, Oct 20, 2012 at 1:14 PM, Sam Flint <harmonicnm7h at gmail.com>
> >> wrote:
> >> >>> Well, now I'm getting a 404 error for my apache server, and i have 1
> >> >>> vhost setup, i want to set up 2 more, how can i fix it?
> >> >>>
> >> >>> Sam
> >> >>>
> >> >>> --
> >> >>> Sam Flint
> >> >>> flintfam.org/~swflint
> >> >>> _______________________________________________
> >> >>> OLUG mailing list
> >> >>> OLUG at olug.org
> >> >>> https://lists.olug.org/mailman/listinfo/olug
> >> >> _______________________________________________
> >> >> OLUG mailing list
> >> >> OLUG at olug.org
> >> >> https://lists.olug.org/mailman/listinfo/olug
> >> >
> >> >
> >> >
> >> > --
> >> > Sam Flint
> >> > flintfam.org/~swflint
> >>
> >>
> >>
> >> --
> >> Sam Flint
> >> flintfam.org/~swflint
> >> _______________________________________________
> >> OLUG mailing list
> >> OLUG at olug.org
> >> https://lists.olug.org/mailman/listinfo/olug
> >>
> > _______________________________________________
> > OLUG mailing list
> > OLUG at olug.org
> > https://lists.olug.org/mailman/listinfo/olug
>
>
>
> --
> Sam Flint
> flintfam.org/~swflint
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug
>



More information about the OLUG mailing list