$50 if you sort out my silly apache problem!

I am kind of in a rush and have wasted hours looking on google how to
do this so will happily pay $50 to somone instead. I reckon for
someone who knows what they are doing its very easy job... This offer
expires in two hours when I leave to go home. It's boring at work and
I have remote desktop into my home network setup to get this working
for the weekend.

I want to set up two directories, and route all requests to
mydomain.com to one directory, and all requests to myotherdomain.com
to another. thats all!

Currently I have apache running but all the requests goto the same
place.

Here is my exact current apache.conf file that I have to edit:

(Note the platfrom in a qnap TS-109 NAS. I have winSCP and putty all
setup so I can change the config file etc. Just need to know what to
do).



#ServerType standalone
ServerRoot "/usr/local/apache"
#LockFile /usr/local/apache/logs/apache.lock
PidFile /usr/local/apache/logs/apache.pid
ScoreBoardFile /usr/local/apache/logs/apache.scoreboard
#ResourceConfig /usr/local/apache/conf/srm.conf
#AccessConfig /usr/local/apache/conf/access.conf
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 0
#Listen 3000
#Listen 12.34.56.78:80
#BindAddress *
LoadModule php5_module libexec/libphp5.so
Port 80
User guest
Group guest
ServerAdmin ken [at] NasARM
#ServerName www.example.com
DocumentRoot "/share/Qweb"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/share/Qweb">
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.php
</IfModule>

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

UseCanonicalName On

<IfModule mod_mime.c>
TypesConfig /usr/local/apache/conf/mime.types
</IfModule>

DefaultType text/plain

<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/local/apache/conf/magic
</IfModule>

HostnameLookups Off
ErrorLog /usr/local/apache/logs/apache_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 /usr/local/apache/logs/apache_access_log common
ServerSignature On

#
# Aliases: Add here as many aliases as you need (with no limit). The
format is
# Alias fakename realname
#
<IfModule mod_alias.c>
Alias /Qmultimedia/ "/home/httpd/Qmultimedia/"
Alias /v3_menu/ "/home/httpd/v3_menu/"
ScriptAlias /cgi-bin/Qmultimedia/ "/home/httpd/cgi-bin/Qmultimedia/"
ScriptAlias /Qmultimedia/cgi-bin/ "/home/httpd/Qmultimedia/cgi-bin/"
<Directory "/home/httpd/Qmultimedia">
Options MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "/home/httpd/v3_menu">
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "/home/httpd/Qmultimedia/cgi-bin/">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
<Directory "/home/httpd/cgi-bin/Qmultimedia/">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
</IfModule>

<IfModule mod_autoindex.c>
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
</IfModule>

#
# Document types.
#
<IfModule mod_mime.c>
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddCharset ISO-8859-8 .iso8859-8
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage kr .kr
AddCharset ISO-2022-KR .iso-kr
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cs .cz .cs
AddLanguage ru .ru
AddLanguage zh-TW .zh-tw
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
AddCharset UTF-8 .utf8
<IfModule mod_negotiation.c>
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru
ltz ca es sv tw
</IfModule>
AddType application/x-tar .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
AddHandler cgi-script .cgi
AddType text/html .shtml
AddHandler server-parsed .shtml
AddHandler send-as-is asis
AddHandler imap-file map
AddHandler type-map var

</IfModule>

<IfModule mod_setenvif.c>
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
</IfModule>
william.hooper [ Fr, 12 Oktober 2007 15:59 ] [ ID #1843377 ]

Re: $50 if you sort out my silly apache problem!

Post removed (X-No-Archive: yes)
Notifier Deamon [ Fr, 12 Oktober 2007 16:47 ] [ ID #1843381 ]

Re: $50 if you sort out my silly apache problem!

For some reason this works:

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "/share/Qweb/whooper"
ServerName any_thing_else.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "/share/Qweb/"
ServerName willyhoops.com
</VirtualHost>

but if i leave out the :80 then it does not. when i call up www.willyhoops.com
on the internet i get the "/share/Qweb/" directory. when i access my
web on the local machine i get the "/share/Qweb/whooper" directory.
unfortunately i do not have any other domain names pointing at my
static ip address yet so i will only know tomorrow. what is strage is
that typing 87.194.36.12 into internet explorer does not show the "/
share/Qweb/whooper" directory. thats not what i expected but maybe its
ok anyway.
william.hooper [ Fr, 12 Oktober 2007 16:54 ] [ ID #1843382 ]

Re: $50 if you sort out my silly apache problem!

my $50 dollar offer is withdrawn of course unless it turns out that
what i put here does not work when i get the www.whooper.co.uk
pointing at my domain as well.
william.hooper [ Fr, 12 Oktober 2007 16:58 ] [ ID #1843383 ]

Re: $50 if you sort out my silly apache problem!

its even stranger... when i call up www.willyhoops.com at home (inside
my intranet) it comes up with the "/share/Qweb/whooper" directory but
when i call up www.willyhoops.com from outside it comes up with "/
share/Qweb/". one day i will figure this all out and post a guide to
how to set it all up over at the qnap forum.
william.hooper [ Fr, 12 Oktober 2007 17:05 ] [ ID #1843385 ]

Re: $50 if you sort out my silly apache problem!

Post removed (X-No-Archive: yes)
Notifier Deamon [ Fr, 12 Oktober 2007 17:31 ] [ ID #1843386 ]

Re: $50 if you sort out my silly apache problem!

Post removed (X-No-Archive: yes)
Notifier Deamon [ Fr, 12 Oktober 2007 17:32 ] [ ID #1843387 ]

Re: $50 if you sort out my silly apache problem!

Exactly which means it is not working as i expected becuase with this
config:

<VirtualHost *:80>
DocumentRoot "/share/Qweb/whooper"
ServerName any_thing_else.com
</VirtualHost>


<VirtualHost *:80>
DocumentRoot "/share/Qweb/"
ServerName willyhoops.com
</VirtualHost>

I was expecting only http://www.willyhoops.com/ to be routed to "/
share/Qweb/" and http://87.194.36.12/ requests to go to the other
folder "/share/Qweb/whooper". I am very confused.
william.hooper [ Fr, 12 Oktober 2007 18:08 ] [ ID #1843388 ]

Re: $50 if you sort out my silly apache problem!

Oh i will add the

<Directory "/the/second/directory">
Options ...
Order allow,deny
Allow from all
</Directory>

bit that you suggested but I do not have and see if it improves. if so
I owe you...
william.hooper [ Fr, 12 Oktober 2007 18:17 ] [ ID #1843389 ]

Re: $50 if you sort out my silly apache problem!

oh maybe it is because

DocumentRoot "/share/Qweb/whooper"

should actually be

DocumentRoot "/share/Qweb/whooper/"
william.hooper [ Fr, 12 Oktober 2007 18:33 ] [ ID #1843390 ]

Re: $50 if you sort out my silly apache problem!

no god another three hous messing about and i can't get it to work.i
hate computers
william.hooper [ Fr, 12 Oktober 2007 19:27 ] [ ID #1843392 ]
Webserver » alt.apache.configuration » $50 if you sort out my silly apache problem!

Vorheriges Thema: Apache's mod_rewrite Help
Nächstes Thema: Apache return 304's, refusing to update pages