Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Virtualhost and restart problem

Status
Not open for further replies.

Xenocide1

Technical User
Oct 21, 2003
10
US
here is my virtual host stuff,
NameVirtualHost 192.168.1.3:80


<VirtualHost 192.168.1.3:80>
DocumentRoot C:/cfusionmx/ ServerAlias *.gomez.dns4me.com *.dns4me.com *.com /gomez
ServerName </VirtualHost>


<VirtualHost 192.168.1.3:80>
DocumentRoot C:/cfusionmx/ ServerAlias moviegames-warez.is-a-geek.org *.is-a-geek.org *.org
ServerName moviegames-warez.is-a-geek.org
</VirtualHost>

it is messy i know but for the las 3 days i have been scouring forums to try to see what my problem with this is.. i realized that when i restat the apache server.. the FIRST webpage i visit that is the page BOTH virtual hosts show.... please help i am going crazy and this just tops the cake....
 
Thanx for the fast reply.. i am not too sure on how to implament it though.

<VirtualHost 192.168.1.3:80>
DocumentRoot C:/cfusionmx/ ServerAlias *.gomez
ServerName UseCanonicalName off
</VirtualHost>

here is what i tried. and the same still happens.. maybe i have called this funtion wrong... still a newbie on apache... if you could help it would be great!
 
I did some more changes and now it will show the page that is listed first in section#3 virtual host... how can i get it to show thier corrisponding pages... well here is my httpd.conf in full...




### Section 1: Global Environment

ServerRoot &quot;C:/Program Files/Apache Group/Apache2&quot;
PidFile logs/httpd.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild 0
</IfModule>

Listen 80

LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
#LoadModule auth_anon_module modules/mod_auth_anon.so
#LoadModule auth_dbm_module modules/mod_auth_dbm.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule headers_module modules/mod_headers.so
LoadModule imap_module modules/mod_imap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so


### Section 2: 'Main' server configuration

ServerAdmin pacobob@earthlink.net
ServerName UseCanonicalName Off
DocumentRoot &quot;C:/cfusionmx/

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


<Directory &quot;C:/cfusionmx/
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

</Directory>

UserDir &quot;My Documents/My Website&quot;

DirectoryIndex index.cfm index.html index.html.var
AccessFileName .htaccess

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

TypesConfig conf/mime.types

DefaultType text/plain

<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>

HostnameLookups Off

ErrorLog logs/error.log

LogLevel warn

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

CustomLog logs/access.log common

ServerTokens Full

ServerSignature On

Alias /icons/ &quot;C:/Program Files/Apache Group/Apache2/icons/&quot;

<Directory &quot;C:/Program Files/Apache Group/Apache2/icons&quot;>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Alias /manual &quot;C:/Program Files/Apache Group/Apache2/manual&quot;

<Directory &quot;C:/Program Files/Apache Group/Apache2/manual&quot;>
Options Indexes FollowSymLinks MultiViews IncludesNoExec
AddOutputFilter Includes html
AllowOverride None
Order allow,deny
Allow from all
</Directory>


ScriptAlias /cgi-bin/ &quot;C:/Program Files/Apache Group/Apache2/cgi-bin/&quot;

<Directory &quot;C:/Program Files/Apache Group/Apache2/cgi-bin&quot;>
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

#
# Creating Alias for ColdFusion MX CFIDE directory:
#
#
Alias /CFIDE &quot;C:/cfusionmx/Alias /cfide &quot;C:/cfusionmx/<Directory &quot;C:/cfusionmx/ Options Indexes FollowSymLinks MultiViews IncludesNoExec
AddOutputFilter Includes html
AllowOverride None
Order allow,deny
Allow from all
</Directory>

IndexOptions FancyIndexing VersionSort

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

AddEncoding x-compress Z
AddEncoding x-gzip gz tgz

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

LanguagePriority en da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv tw

ForceLanguagePriority Prefer Fallback

AddDefaultCharset ISO-8859-1

AddCharset ISO-8859-1 .iso8859-1 .latin1
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
AddCharset ISO-8859-3 .iso8859-3 .latin3
AddCharset ISO-8859-4 .iso8859-4 .latin4
AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5 .Big5 .big5
# For russian, more than one charset is used (depends on client, mostly):
AddCharset WINDOWS-1251 .cp-1251 .win-1251
AddCharset CP866 .cp866
AddCharset KOI8-r .koi8-r .koi8-ru
AddCharset KOI8-ru .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8 .utf8

AddCharset GB2312 .gb2312 .gb
AddCharset utf-7 .utf7
AddCharset utf-8 .utf8
AddCharset big5 .big5 .b5
AddCharset EUC-TW .euc-tw
AddCharset EUC-JP .euc-jp
AddCharset EUC-KR .euc-kr
AddCharset shift_jis .sjis

AddType application/x-tar .tgz
AddType image/x-icon .ico

AddHandler type-map var

BrowserMatch &quot;Mozilla/2&quot; nokeepalive
BrowserMatch &quot;MSIE 4\.0b2;&quot; nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch &quot;RealPlayer 4\.0&quot; force-response-1.0
BrowserMatch &quot;Java/1\.0&quot; force-response-1.0
BrowserMatch &quot;JDK/1\.0&quot; force-response-1.0

BrowserMatch &quot;Microsoft Data Access Internet Publishing Provider&quot; redirect-carefully
BrowserMatch &quot;^WebDrive&quot; redirect-carefully
BrowserMatch &quot;^WebDAVFS/1.[012]&quot; redirect-carefully
BrowserMatch &quot;^gnome-vfs&quot; redirect-carefully

<IfModule mod_ssl.c>
Include conf/ssl.conf
</IfModule>
# JRun Settings
LoadModule jrun_module &quot;C:/CFusionMX/runtime/lib/wsconfig/1/mod_jrun20.so&quot;
<IfModule mod_jrun20.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore &quot;C:/CFusionMX/runtime/lib/wsconfig/1/jrunserver.store&quot;
JRunConfig Bootstrap 127.0.0.1:51010
#JRunConfig Errorurl <optionally redirect to this URL on errors>
AddHandler jrun-handler .cfm .cfc .cfml .jsp .jws
</IfModule>


### Section 3: Virtual Hosts

NameVirtualHost 192.168.1.3:80


<VirtualHost *>
UseCanonicalName off
DocumentRoot C:/cfusionmx/ ServerAlias moviegames-warez.is-a-geek.org *.is-a-geek.org *.org *.dyndsn.org
ServerName moviegames-warez.is-a-geek.org

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


<Directory &quot;C:/cfusionmx/
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

</Directory>

</VirtualHost>


<VirtualHost *>
UseCanonicalName off
DocumentRoot C:/cfusionmx/ ServerAlias *.gomez.dns4me.com *.dns4me.com /gomez
ServerName </VirtualHost>



And if it makes any difference, i am using 2 dynamic web services... i know thier part works because i can see both pages... depending on how i organize section3.. please help.
 
I could REALLY use some help. PLEASE! I am Running XP home.. and i have a LINKSYS router and DSL modem.... i have tried using &quot;127.0.0.1&quot; (also using 127.0.0.1 for www1 and 127.0.0.2 for and &quot;local.&quot; instead of &quot; in both ect/host and http.conf... I dont know what i am doing wrong.. i have dns4me and dyndns grabbing my ip and i can see both pages if i rearrange the virtualhost order.. is it my OS or my version of Apache.. i am running apache 2.044.. I REALLY appreciate all the help. Thanx again!
 
Do the following with both of the virtualhosts:

<VirtualHost 192.168.1.3:80>
UseCanonicalName off
DocumentRoot C:/cfusionmx/ ServerAlias *.gomez
ServerName UseCanonicalName off
</VirtualHost>

Also, one thing to consider. You are running XP home, the maximum concurrent connections to that OS is 5, so don't try to run a public server.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Here are my new setting.. still no luck.. Same resaults... I feel like i am trapped in the Twilight Zone.... whichever website i go to first that is the one that takes over the other webpage.. (i go to www1 after a restart and ww2 looks just like ww1 except the images dont load.. and i go to www2 after i restart again and ww1 looks just like ww2 except the images dont load)



NameVirtualHost 192.168.1.3:80
<VirtualHost 192.168.1.3:80>
UseCanonicalName off
DocumentRoot C:/cfusionmx/ ServerAlias *.gomez
ServerName UseCanonicalName off
</VirtualHost>


<VirtualHost 192.168.1.3:80>
UseCanonicalName off
DocumentRoot C:/cfusionmx/ ServerAlias moviegames-warez.is-a-geek.org *.moviegames-warez
ServerName moviegames-warez.is-a-geek.org
UseCanonicalName off
</VirtualHost>

My server is public but only for a small few... any suggestions for my future upgrade.. weather i should go to win2000 or even XP Pro??? may be some time befor i can afford it but i want to be public to a higher number of readers..

And thankyou for all your help!
 
[lol]

From your description above, this sounds like a CF problem, not Apache.

Go into the CF admin > Caching.

Make sure that Cache web server paths is unchecked.

The above is assuming you are running MX, if it's an earlier version, let me know and I'll give you the fix.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Forgot to mention:

XP Home - 5 concurrent connections.
XP Pro - 10 concurrent connections.

If you are serious about running a public server, 2000 Server or 2003 Server are the best way to go.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
OK i am running CF MX.. BUT i am in MY CF admin Page.. Server Settings > Caching (only one i could find) but all i see is..

Template cache size (number of templates) [1024]

Trusted cache [unchecked]

Limit the maximum number of cached queries on the server to [100]

am i in the wrong place?
 
Hi mate,

Sorry, I'm thinking of 6.1

For MX, do the following:

In the MX directory, look for the jrun.xml file (Default is the following:)

runtime\servers\default\SERVER-INF\jrun.xml

Find the entry named &quot;cacheRealPath&quot;.

Change from:

<attribute name=&quot;cacheRealPath&quot;>true</attribute>

To

<attribute name=&quot;cacheRealPath&quot;>false</attribute>

Restart MX.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Thanx GREAT It works.. i cant belive it was CFMX... that was the first place i looked.. but only in thier admin pages... all the settings.. And one last question..... i am looking into windows 200 or 2003 and i see that they have a standard and a web edition as well as enterprise... but i dont think i need something that expensive.. i am wondering about the difference in the 2 and which is actually better for a small time server like me. as far as i could tell standard could do a few things more but is it really worth the extra sheelout of cash??

I hope no one gets mad at me asking the Q. here just thought i would get it in while i had a good brain helping me out!!

Thank you soo much!! :)
 
ok now i can see the web pages.. but nolonger can anyone else see them..

doesnt work.. what can i do? i am sure my ip isnt blocking port 80.. but what is it.. before i tried this the first virtual host would work without a hitch.. man what now.. lol i guess i need more help.. should i start a new thread or is it ok if i continue on this one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top