jg6789 | 1 Oct 02:05 2008
Picon
Picon

Re: Running Multiple Windows Services on port 8080

We are using dydns too. We can append the port number, sure. that sucks for 
users though. (thats why we use webhop)maybe we should petition dyndns to 
allow the domains they hand out to be linked to an IPADDRESS:PORT instead of 
just an IP. That would elminate any workarounds like webhop and suffice to 
say solve the port 80 issue with ISP's.

----- Original Message ----- 
From: "Brian Mearns" <mearns.b <at> gmail.com>
To: <users <at> httpd.apache.org>
Sent: Tuesday, September 30, 2008 2:44 PM
Subject: Re: [users <at> httpd] Running Multiple Windows Services on port 8080

> How are you "redirecting" to the IP address? I used to use dyndns.com
> for my subdomain name, and I was able to append the port number with
> no problem. E.g., my subdomain was something like bmearns.homeip.net,
> so I just went to http://bmearns.homeip.net:8080.
>
> Do you not want users to see your IP address for security reasons? Or
> just because it's ugly and utterly forgettable? If it's for security
> reasons, and they're connecting directly to your site through the
> domain forwarding (i.e., not through a proxy), then they should be
> able to get your IP address anyway with a DNS lookup.
>
> -Brian
>
>>> jg6789 <at> cox.net wrote:
>>>>
>>>> John,
>>>>
>>>> We too are limited to port 8080. since our ISP blocks port 80. Have you
(Continue reading)

George Mashini | 1 Oct 02:32 2008

Proxy to Tomcat AJP

Hello,

I setup Apache to proxy to Tomcat using AJP, currently without SSL.  This is being used to connect a Flex application that uses AMF to Java on the back end.  All AMF calls are done using a POST to a servlet.  I have 3 tomcat instances running on separate ports.  Login is used for logging into the application.  NA1 and NA2 are the application servers.  This is running on RH Enterprise Linux 5, Apache HTTPD 2.2.3 and Tomcat 6.0.14

It all appears to work fine until I try to stress test it or someone uses the application for an extended period of time.  The errors that we encounter are either connection refused or hung connections, where the connection is alive but never returns a response.  At one point the connection would drop after a few minutes when it got hung and I would get APR errors in Apache and Broken pipe errors in Tomcat, but after changing some HTTPD configuration settings it now just stays hung forever.  I run the same stress tests against Tomcat directly and they all complete without errors.  I researched the configuration for each side of the connection, but I cannot find what I am doing wrong.  I am including each piece of the configuration.  Any help would be reall y appreciated.  Sorry for the lengthy email.

Thank you,

HTTPD.conf

#######################################
# START HTTPD.CONF
#######################################

ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 0
KeepAliveTimeout 15

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</IfModule>


<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

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 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_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 file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so

Include conf.d/*.conf

User apache
Group apache

ServerAdmin root <at> localhost
#ServerName www.example.com:80

UseCanonicalName Off
DocumentRoot "/srv/www"

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory "/srv/www">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_userdir.c>
    UserDir disable
</IfModule>

DirectoryIndex index.html index.html.var

AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

TypesConfig /etc/mime.types

DefaultType text/plain

<IfModule mod_mime_magic.c>
#   MIMEMagicFile /usr/share/magic.mime
    MIMEMagicFile conf/magic
</IfModule>

HostnameLookups Off
ErrorLog logs/error_log
LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

CustomLog logs/access_log combined

ServerSignature On

Alias /icons/ "/var/www/icons/"

<Directory "/var/www/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
</IfModule>

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif

ReadmeName README.html
HeaderName HEADER.html

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw

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

ForceLanguagePriority Prefer Fallback

AddDefaultCharset UTF-8

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

AddHandler type-map var

AddType text/html .shtml

Alias /error/ "/var/www/error/"

<IfModule mod_negotiation.c>
<IfModule mod_include.c>
    <Directory "/var/www/error">
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback
    </Directory>
</IfModule>
</IfModule>

BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

<VirtualHost *:80>
    ServerName xyz.net
</VirtualHost>

<VirtualHost *:80>
    ServerName login.xyz.net
    ProxyPass / ajp://localhost:8009/
    ProxyRequests Off
    ProxyPassReverse / ajp://localhost:8009/
    ProxyPreserveHost On
</VirtualHost>

<VirtualHost *:80>
    ServerName na1.xyz.net
    ProxyPass / ajp://localhost:8010/ max=5
    ProxyRequests Off
    ProxyPassReverse / ajp://localhost:8010/
    ProxyPreserveHost On
</VirtualHost>

<VirtualHost *:80>
    ServerName na2.xyz.net
    ProxyPass / ajp://localhost:8011/ max=20
    ProxyPassReverse / ajp://localhost:8010/
    ProxyVia On 
    ProxyPreserveHost On
</VirtualHost>

#######################################
# END HTTPD.CONF
#######################################

workers.properties in httpd/conf

#######################################
# START workers.properties
#######################################

# List workers
worker.list=login, NA1, NA2
#
# Define loginn
worker.login.port=8009
worker.login.host=localhost
worker.login.type=ajp13
worker.login.cachesize=10
worker.login.cache_timeout=600
worker.login.socket_timeout=300

# Define NA1
worker.NA1.port=8010
worker.NA1.host=localhost
worker.NA1.type=ajp13
worker.NA1.cachesize=10
worker.NA1.cache_timeout=600
worker.NA1.socket_timeout=300

# Define NA2
worker.NA2.port=8011
worker.NA2.host=localhost
worker.NA2.type=ajp13
worker.NA2.cachesize=10
worker.NA2.cache_timeout=600
worker.NA2.socket_timeout=300

#######################################
# END workers.properties
#######################################

proxy_ajp.conf in httpd/conf.d

#######################################
# START proxy_ajp.conf
#######################################

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

#######################################
# END proxy_ajp.conf
#######################################

Server.xml for NA1 tomact

#######################################
# START server.xml
#######################################

<Server port="8005" shutdown="SHUTDOWN">

  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <Listener className="org.apache.catalina.core.JasperListener" />
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

  <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <Service name="Catalina">
    <Connector port="8087" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="443" />
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector
    port="8010"
    protocol="AJP/1.3"
    redirectPort="8443"
    acceptCount="100"
         maxThreads="400"/>

    <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
      </Host>
    </Engine>
  </Service>
</Server>

#######################################
# END server.xml
#######################################EN
George Mashini | 1 Oct 02:34 2008
Picon

Proxy to Tomcat AJP

Hello,

I setup Apache to proxy to Tomcat using AJP, currently without SSL.  This is being used to connect a Flex application that uses AMF to Java on the back end.  All AMF calls are done using a POST to a servlet.  I have 3 tomcat instances running on separate ports.  Login is used for logging into the application.  NA1 and NA2 are the application servers.  This is running on RH Enterprise Linux 5, Apache HTTPD 2.2.3 and Tomcat 6.0.14

It all appears to work fine until I try to stress test it or someone uses the application for an extended period of time.  The errors that we encounter are either connection refused or hung connections, where the connection is alive but never returns a response.  At one point the connection would drop after a few minutes when it got hung and I would get APR errors in Apache and Broken pipe errors in Tomcat, but after changing some HTTPD configuration settings it now just stays hung forever.  I run the same stress tests against Tomcat directly and they all complete without errors.  I researched the configuration for each side of the connection, but I cannot find what I am doing wrong.  I am including each piece of the configuration.  Any help would be reall y appreciated.  Sorry for the lengthy email.

Thank you,

HTTPD.conf

#######################################
# START HTTPD.CONF
#######################################

ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 0
KeepAliveTimeout 15

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</IfModule>


<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

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 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_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 file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so

Include conf.d/*.conf

User apache
Group apache

ServerAdmin root <at> localhost
#ServerName www.example.com:80

UseCanonicalName Off
DocumentRoot "/srv/www"

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory "/srv/www">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_userdir.c>
    UserDir disable
</IfModule>

DirectoryIndex index.html index.html.var

AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

TypesConfig /etc/mime.types

DefaultType text/plain

<IfModule mod_mime_magic.c>
#   MIMEMagicFile /usr/share/magic.mime
    MIMEMagicFile conf/magic
</IfModule>

HostnameLookups Off
ErrorLog logs/error_log
LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

CustomLog logs/access_log combined

ServerSignature On

Alias /icons/ "/var/www/icons/"

<Directory "/var/www/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
</IfModule>

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif

ReadmeName README.html
HeaderName HEADER.html

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw

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

ForceLanguagePriority Prefer Fallback

AddDefaultCharset UTF-8

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

AddHandler type-map var

AddType text/html .shtml

Alias /error/ "/var/www/error/"

<IfModule mod_negotiation.c>
<IfModule mod_include.c>
    <Directory "/var/www/error">
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback
    </Directory>
</IfModule>
</IfModule>

BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

<VirtualHost *:80>
    ServerName xyz.net
</VirtualHost>

<VirtualHost *:80>
    ServerName login.xyz.net
    ProxyPass / ajp://localhost:8009/
    ProxyRequests Off
    ProxyPassReverse / ajp://localhost:8009/
    ProxyPreserveHost On
</VirtualHost>

<VirtualHost *:80>
    ServerName na1.xyz.net
    ProxyPass / ajp://localhost:8010/ max=5
    ProxyRequests Off
    ProxyPassReverse / ajp://localhost:8010/
    ProxyPreserveHost On
</VirtualHost>

<VirtualHost *:80>
    ServerName na2.xyz.net
    ProxyPass / ajp://localhost:8011/ max=20
    ProxyPassReverse / ajp://localhost:8010/
    ProxyVia On 
    ProxyPreserveHost On
</VirtualHost>

#######################################
# END HTTPD.CONF
#######################################

workers.properties in httpd/conf

#######################################
# START workers.properties
#######################################

# List workers
worker.list=login, NA1, NA2
#
# Define loginn
worker.login.port=8009
worker.login.host=localhost
worker.login.type=ajp13
worker.login.cachesize=10
worker.login.cache_timeout=600
worker.login.socket_timeout=300

# Define NA1
worker.NA1.port=8010
worker.NA1.host=localhost
worker.NA1.type=ajp13
worker.NA1.cachesize=10
worker.NA1.cache_timeout=600
worker.NA1.socket_timeout=300

# Define NA2
worker.NA2.port=8011
worker.NA2.host=localhost
worker.NA2.type=ajp13
worker.NA2.cachesize=10
worker.NA2.cache_timeout=600
worker.NA2.socket_timeout=300

#######################################
# END workers.properties
#######################################

proxy_ajp.conf in httpd/conf.d

#######################################
# START proxy_ajp.conf
#######################################

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

#######################################
# END proxy_ajp.conf
#######################################

Server.xml for NA1 tomact

#######################################
# START server.xml
#######################################

<Server port="8005" shutdown="SHUTDOWN">

  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <Listener className="org.apache.catalina.core.JasperListener" />
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

  <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <Service name="Catalina">
    <Connector port="8087" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="443" />
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector
    port="8010"
    protocol="AJP/1.3"
    redirectPort="8443"
    acceptCount="100"
         maxThreads="400"/>

    <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
      </Host>
    </Engine>
  </Service>
</Server>

#######################################
# END server.xml
#######################################EN

solprovider | 1 Oct 09:21 2008
Picon

Re: How can I uninstall Apache2 from Windows98?

On 9/28/08, Luke Turner <lukon100 <at> hotmail.com> wrote:
> HTTPD.EXE won't shut down when I turn my computer off. And I see no
> mechanism by which I could properly shut it down. I keep having to do an
> "end task" on it. Google search on this problem indicates that Apache2
> simply isn't right for Windows98se. Hence I want to uninstall it.

I know your issue was resolved; just replying to correct misinformation.

This command stops Apache httpd cleanly:
   httpd.exe -k shutdown
You can also use the Apache Service Monitor's Stop button.
This applies to all versions of Windows, including Windows98SE.
See http://httpd.apache.org/docs/2.2/platform/windows.html#wincons

To the best of my knowledge, Windows98SE does not have a place to put
commands to run during shutdown.  Shutdown closes all programs,
completes any writes to disk, and clears the disk write buffer.
Apache httpd should close without corrupting anything.  Using ALT_F4,
CTRL_C, or the X window button may not close all processes -- a
performance issue if the computer were to remain running, but shutdown
should kill those processes.

solprovider

---------------------------------------------------------------------
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 <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org

Brian Mearns | 1 Oct 12:40 2008
Picon

Re: Running Multiple Windows Services on port 8080

As far as I know, dyndns gives you an actual DNS lookup, so when
someone types your subdomain into their browser, it does a DNS lookup,
and gets the IP address you gave to dyndns. That's why port numbers
work, it's not that dyndns is listening on every port and forwarding
based on the requested subdomain. That being the case, I don't think
there's any way to do what you want here: DNS maps names to ip
addresses, it doesn't know anything about ports.

I'm not sure how webhop works: you can't tell it to redirect
my.domain.com to my.domain.com:8080? Are you only able to give an IP
address and port for the destination?

If you have legitimate business needs for this site, your best bet is
probably to just get a business account with your ISP that will
unblock port 80. You'd probably get a static IP with the account, too,
so you wouldn't need dyndns, you can just buy a 5$ a year domain name
of your own. Plus, additional bandwidth.

-Brian

On Tue, Sep 30, 2008 at 8:05 PM,  <jg6789 <at> cox.net> wrote:
> We are using dydns too. We can append the port number, sure. that sucks for
> users though. (thats why we use webhop)maybe we should petition dyndns to
> allow the domains they hand out to be linked to an IPADDRESS:PORT instead of
> just an IP. That would elminate any workarounds like webhop and suffice to
> say solve the port 80 issue with ISP's.
>
> ----- Original Message ----- From: "Brian Mearns" <mearns.b <at> gmail.com>
> To: <users <at> httpd.apache.org>
> Sent: Tuesday, September 30, 2008 2:44 PM
> Subject: Re: [users <at> httpd] Running Multiple Windows Services on port 8080
>
>
>> How are you "redirecting" to the IP address? I used to use dyndns.com
>> for my subdomain name, and I was able to append the port number with
>> no problem. E.g., my subdomain was something like bmearns.homeip.net,
>> so I just went to http://bmearns.homeip.net:8080.
>>
>> Do you not want users to see your IP address for security reasons? Or
>> just because it's ugly and utterly forgettable? If it's for security
>> reasons, and they're connecting directly to your site through the
>> domain forwarding (i.e., not through a proxy), then they should be
>> able to get your IP address anyway with a DNS lookup.
>>
>> -Brian
>>
>>>> jg6789 <at> cox.net wrote:
>>>>>
>>>>> John,
>>>>>
>>>>> We too are limited to port 8080. since our ISP blocks port 80. Have you
>>>>> ever found a work around for this? We currently have to have our domain
>>>>> [sub.domain.com] redirect to 72.x.x.x.:8080 in order for it to work.
>>>>> Now
>>>>> users see the ip address in the browser address bar. not good. not good
>>>>> at
>>>>> all.
>>>>>
>>>>> Apache 2.2.9
>>>>> Linksys Gateway/Router WCG200
>>>>>
>>>>> Jay
>>
>> ---------------------------------------------------------------------
>> 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 <at> httpd.apache.org
>>  "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
>> For additional commands, e-mail: users-help <at> httpd.apache.org
>>
>
>
> ---------------------------------------------------------------------
> 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 <at> httpd.apache.org
>  "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
> For additional commands, e-mail: users-help <at> httpd.apache.org
>
>

---------------------------------------------------------------------
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 <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org

jg6789 | 1 Oct 13:20 2008
Picon
Picon

Re: Running Multiple Windows Services on port 8080

Brian,
tried my.domain.com to my.domain.com:8080. doesnt work only allows IP:PORT. 
btw Cox internet out here even with a business account blocks port 80.

----- Original Message ----- 
From: "Brian Mearns" <mearns.b <at> gmail.com>
To: <users <at> httpd.apache.org>
Sent: Wednesday, October 01, 2008 3:40 AM
Subject: Re: [users <at> httpd] Running Multiple Windows Services on port 8080

> As far as I know, dyndns gives you an actual DNS lookup, so when
> someone types your subdomain into their browser, it does a DNS lookup,
> and gets the IP address you gave to dyndns. That's why port numbers
> work, it's not that dyndns is listening on every port and forwarding
> based on the requested subdomain. That being the case, I don't think
> there's any way to do what you want here: DNS maps names to ip
> addresses, it doesn't know anything about ports.
>
> I'm not sure how webhop works: you can't tell it to redirect
> my.domain.com to my.domain.com:8080? Are you only able to give an IP
> address and port for the destination?
>
> If you have legitimate business needs for this site, your best bet is
> probably to just get a business account with your ISP that will
> unblock port 80. You'd probably get a static IP with the account, too,
> so you wouldn't need dyndns, you can just buy a 5$ a year domain name
> of your own. Plus, additional bandwidth.
>
> -Brian
>
> On Tue, Sep 30, 2008 at 8:05 PM,  <jg6789 <at> cox.net> wrote:
>> We are using dydns too. We can append the port number, sure. that sucks 
>> for
>> users though. (thats why we use webhop)maybe we should petition dyndns to
>> allow the domains they hand out to be linked to an IPADDRESS:PORT instead 
>> of
>> just an IP. That would elminate any workarounds like webhop and suffice 
>> to
>> say solve the port 80 issue with ISP's.
>>
>> ----- Original Message ----- From: "Brian Mearns" <mearns.b <at> gmail.com>
>> To: <users <at> httpd.apache.org>
>> Sent: Tuesday, September 30, 2008 2:44 PM
>> Subject: Re: [users <at> httpd] Running Multiple Windows Services on port 8080
>>
>>
>>> How are you "redirecting" to the IP address? I used to use dyndns.com
>>> for my subdomain name, and I was able to append the port number with
>>> no problem. E.g., my subdomain was something like bmearns.homeip.net,
>>> so I just went to http://bmearns.homeip.net:8080.
>>>
>>> Do you not want users to see your IP address for security reasons? Or
>>> just because it's ugly and utterly forgettable? If it's for security
>>> reasons, and they're connecting directly to your site through the
>>> domain forwarding (i.e., not through a proxy), then they should be
>>> able to get your IP address anyway with a DNS lookup.
>>>
>>> -Brian
>>>
>>>>> jg6789 <at> cox.net wrote:
>>>>>>
>>>>>> John,
>>>>>>
>>>>>> We too are limited to port 8080. since our ISP blocks port 80. Have 
>>>>>> you
>>>>>> ever found a work around for this? We currently have to have our 
>>>>>> domain
>>>>>> [sub.domain.com] redirect to 72.x.x.x.:8080 in order for it to work.
>>>>>> Now
>>>>>> users see the ip address in the browser address bar. not good. not 
>>>>>> good
>>>>>> at
>>>>>> all.
>>>>>>
>>>>>> Apache 2.2.9
>>>>>> Linksys Gateway/Router WCG200
>>>>>>
>>>>>> Jay
>>>
>>> ---------------------------------------------------------------------
>>> 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 <at> httpd.apache.org
>>>  "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
>>> For additional commands, e-mail: users-help <at> httpd.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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 <at> httpd.apache.org
>>  "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
>> For additional commands, e-mail: users-help <at> httpd.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> 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 <at> httpd.apache.org
>   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
> For additional commands, e-mail: users-help <at> httpd.apache.org
>
> 

---------------------------------------------------------------------
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 <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org

Picon

Apache not executing Perl script,but perl script is getting downloaded.

Hello All,
 
            I have Apache 2.2.9 running.Perl script is not getting executed,but it is getting downloaded.Here is the configuration done for executing perl scripts.
             
  ScriptAlias /cgi-bin/ "C:/PROGRA~1/CSCOpx/cgi-bin/"
<Directory "C:/PROGRA~1/CSCOpx/cgi-bin/">
AllowOverride None
Options ExecCGI
AddHandler cgi-script .pl
ScriptInterpreterSource Registry-Strict
</Directory>
   
Please help me to resolve the issue.
 
Thanks and Regards,
Prathima.
jwberger | 1 Oct 14:08 2008
Picon

Re: Running Multiple Windows Services on port 8080


I did that but it still seemed like if I had only one windows service it
started all three sites no matter what.  I install a new service that used
one of the ip:8080 for its listening address.  It used a different logfile,
error file and document root.  However, when I started the service I could
get to all three IP addresses at port 8080.  Again, maybe I am doing
something wrong.

John

William A. Rowe, Jr. wrote:
> 
> jwberger wrote:
>> I am novice when it comes to Apache.  I have installed 2.2.9 on a Windows
>> 2003 server and can get it to run fine.  The server has one NIC with
>> three
>> IP addresses bound to it.  In installed Apache as a Windows service and
>> edited the httpd.conf file so that the server listened on port 8080.  I
>> would like each IP address to run a different site on port 8080 and I
>> would
>> like each site to have its own Windows service so that I can individually
>> shut down a site.  Is this possible?  It seems like if I start just one
>> service I can hit each IP at port 8080 and they all work.  Can you assist
>> me
>> in what I am doing wrong.
> 
> You seem to be getting quite a bit of incorrect advise, so I'll hint that
> you would need *three* httpd.conf files (different names) that have three
> different Listen directives (IP-address:8080), different log file names
> (accesslog and errorlog), and different pidfile directives.
> 
> Then, see
> 
> http://httpd.apache.org/docs/2.2/platform/windows.html#winsvc
> 
> 
> ---------------------------------------------------------------------
> 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 <at> httpd.apache.org
>    "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
> For additional commands, e-mail: users-help <at> httpd.apache.org
> 
> 
> 

--

-- 
View this message in context: http://www.nabble.com/Running-Multiple-Windows-Services-on-port-8080-tp19748920p19759063.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
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 <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org

Francois Gingras | 1 Oct 14:19 2008
Picon

Re: Apache not executing Perl script,but perl script is getting downloaded.

Hello,

With ScriptAlias, you don't actually need Option (+)ExecCGI. You
simply need to allow access to that directory.

Also, make sure that the mod_cgi module is loaded, and you should be good to go.

Frank

On Wed, Oct 1, 2008 at 8:01 AM, Prathima Dandapani -X (pdandapa - HCL
at Cisco) <pdandapa <at> cisco.com> wrote:
> Hello All,
>
>             I have Apache 2.2.9 running.Perl script is not getting
> executed,but it is getting downloaded.Here is the configuration done for
> executing perl scripts.
>
>   ScriptAlias /cgi-bin/ "C:/PROGRA~1/CSCOpx/cgi-bin/"
> <Directory "C:/PROGRA~1/CSCOpx/cgi-bin/">
> AllowOverride None
> Options ExecCGI
> AddHandler cgi-script .pl
> ScriptInterpreterSource Registry-Strict
> </Directory>
>
> Please help me to resolve the issue.
>
> Thanks and Regards,
> Prathima.

---------------------------------------------------------------------
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 <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org

manning allan | 1 Oct 14:07 2008

RE: SSl question

Forgive me for being stupid, but I cannot find in the documentation, nor can I find the list archives.

I know I am rather new to this, and I do not want to be spoon fed, but a little direction would be helpful.

I have successfully added virtual hosts to my Windows box, and have them functioning. I just need one of the hosts to require SSL (HTTPS).

I have found the documentation on how to set up virtual hosts (obviously as it is working) and on how to set up SSL on the whole box.

If this seems to trivial to try to help me, please at least direct me to a forum or other such site where I can learn more.

 

Allan Manning

MIS

Employee Health & Safety Rep (certified)

TG Minto Corporation

300 Toronto St.

Palmerston, Ont.,

N0G 2P0

(519) 417-2249 Direct Line

(519) 343-2800 Ext.2249

(519) 343-3200 Fax

TG VoIP 676-2249

From: manning allan
Sent: Tuesday, September 30, 2008 2:36 PM
To: users <at> httpd.apache.org
Subject: RE: [users <at> httpd] SSl question

 

Where is the list archives, I have searched the documentation (2.2) and can find how to create virtual hosts (which I have already done) but not how to add https to a virtual host, can you direct me to the archives

Allan Manning
MIS
Employee Health & Safety Rep (certified)
TG Minto Corporation
300 Toronto St.
Palmerston, Ont.,
N0G 2P0

(519) 417-2249 Direct Line
(519) 343-2800 Ext.2249
(519) 343-3200 Fax
TG VoIP 676-2249

-----Original Message-----
From: J. Greenlees [mailto:lists <at> jaqui-greenlees.net]
Sent: Tuesday, September 30, 2008 1:36 PM
To: users <at> httpd.apache.org
Subject: Re: [users <at> httpd] SSl question

manning allan wrote:
>
> OK, but I want to make it so that if I input http:// into the address
> bar, it tells me I have to use https://
> I also would like to be able to use http:// for the other domains I use.
> Do I have to make a fancy entry into the httpd.conf file?
>

yup.
the virtual host you want to require https needs to ONLY be defined for
https
and adding https to virutal osts is a well covered subject both in the
list archives and the documentation.

---------------------------------------------------------------------
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 <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org


Gmane