Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

virtual hosts & mysql database question

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  PROBLEM Z HASEŁKIEM NA APACHE2 w PHP  
Author Message
otwdummy

External


Since: Sep 02, 2004
Posts: 3



(Msg. 1) Posted: Thu Sep 02, 2004 6:10 pm
Post subject: virtual hosts & mysql database question
Archived from groups: alt>apache>configuration (more info?)

hi,
here is my situation:

<VirtualHost domain1>
DocumentRoot /dir1
ServerName domain1
DirectoryIndex index.html index.php index.htm index.shtml
ErrorLog logs/domain1.error
TransferLog logs/domain1.transfer
Options Indexes FollowSymLinks
</VirtualHost>

<VirtualHost domain2>
DocumentRoot /dir2
ServerName domain2
DirectoryIndex index.html index.php index.htm index.shtml
ErrorLog logs/domain2.error
TransferLog logs/domain2.transfer
Options Indexes FollowSymLinks
</VirtualHost>

domain1 is a LAN
domain2 is a public domainname
both sites have access to 1 mysql database on localhost.
all (database generated pages as well) works well, except:
after changes to the database inititated by domain2 the database is
updated correctly, but the resulting page has the URL as if the serving
domain is domain 1 and not domain 2.
can somebody tell me how to fix this?

ruud habets

 >> Stay informed about: virtual hosts & mysql database question 
Back to top
Login to vote
shadownetwork

External


Since: Sep 01, 2004
Posts: 15



(Msg. 2) Posted: Thu Sep 02, 2004 8:23 pm
Post subject: Re: virtual hosts & mysql database question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

question.....
are both domains accessing the same database?
i run sql and havent had any of those problems. tell us some more about your
setup, OS , syuff like that.


"ruud habets" <otwdummy.DeleteThis@xs4all.nl> wrote in message
news:41371baf$0$10528$e4fe514c@news.xs4all.nl...
 > hi,
 > here is my situation:
 >
 > <VirtualHost domain1>
 > DocumentRoot /dir1
 > ServerName domain1
 > DirectoryIndex index.html index.php index.htm index.shtml
 > ErrorLog logs/domain1.error
 > TransferLog logs/domain1.transfer
 > Options Indexes FollowSymLinks
 > </VirtualHost>
 >
 > <VirtualHost domain2>
 > DocumentRoot /dir2
 > ServerName domain2
 > DirectoryIndex index.html index.php index.htm index.shtml
 > ErrorLog logs/domain2.error
 > TransferLog logs/domain2.transfer
 > Options Indexes FollowSymLinks
 > </VirtualHost>
 >
 > domain1 is a LAN
 > domain2 is a public domainname
 > both sites have access to 1 mysql database on localhost.
 > all (database generated pages as well) works well, except:
 > after changes to the database inititated by domain2 the database is
 > updated correctly, but the resulting page has the URL as if the serving
 > domain is domain 1 and not domain 2.
 > can somebody tell me how to fix this?
 >
 > ruud habets<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: virtual hosts & mysql database question 
Back to top
Login to vote
otwdummy

External


Since: Sep 02, 2004
Posts: 3



(Msg. 3) Posted: Fri Sep 03, 2004 11:35 am
Post subject: Re: virtual hosts & mysql database question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Niteshade wrote:
 > question.....
 > are both domains accessing the same database?

yes

 > i run sql and havent had any of those problems. tell us some more about your
 > setup, OS , syuff like that.

i'm running a redhat 9 system using apt to update. so right now apache
is version 2.050-1 and mysqld is version 3.23.58. PHP is version 4.2.2-17.
what more info do you need?

ruud


 >
 >
 > "ruud habets" <otwdummy DeleteThis @xs4all.nl> wrote in message
 > news:41371baf$0$10528$e4fe514c@news.xs4all.nl...
 >
  >>hi,
  >>here is my situation:
  >>
  >><VirtualHost domain1>
  >> DocumentRoot /dir1
  >> ServerName domain1
  >> DirectoryIndex index.html index.php index.htm index.shtml
  >> ErrorLog logs/domain1.error
  >> TransferLog logs/domain1.transfer
  >> Options Indexes FollowSymLinks
  >></VirtualHost>
  >>
  >><VirtualHost domain2>
  >> DocumentRoot /dir2
  >> ServerName domain2
  >> DirectoryIndex index.html index.php index.htm index.shtml
  >> ErrorLog logs/domain2.error
  >> TransferLog logs/domain2.transfer
  >> Options Indexes FollowSymLinks
  >></VirtualHost>
  >>
  >>domain1 is a LAN
  >>domain2 is a public domainname
  >>both sites have access to 1 mysql database on localhost.
  >>all (database generated pages as well) works well, except:
  >>after changes to the database inititated by domain2 the database is
  >>updated correctly, but the resulting page has the URL as if the serving
  >>domain is domain 1 and not domain 2.
  >>can somebody tell me how to fix this?
  >>
  >>ruud habets
 >
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: virtual hosts & mysql database question 
Back to top
Login to vote
shadownetwork

External


Since: Sep 01, 2004
Posts: 15



(Msg. 4) Posted: Fri Sep 03, 2004 10:14 pm
Post subject: Re: virtual hosts & mysql database question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

ok.. so what you have are 2 completely seperate sites using the same
database, and the same database generated site files.
my best guess is that your system is defaulting to your main site. have you
tried putting your lan based domain at the top of the virtual host list? may
be as simple as that. if the site files are seperate i dont see why apache
would bring up your public domain whilst working with the private one. are
you using the private domain as a way of updateing the public site? or is it
alltogether diffrent?


"ruud habets" <otwdummy.RemoveThis@xs4all.nl> wrote in message
news:4138108e$0$566$e4fe514c@news.xs4all.nl...
 > Niteshade wrote:
  > > question.....
  > > are both domains accessing the same database?
 >
 > yes
 >
  > > i run sql and havent had any of those problems. tell us some more about
your
  > > setup, OS , syuff like that.
 >
 > i'm running a redhat 9 system using apt to update. so right now apache
 > is version 2.050-1 and mysqld is version 3.23.58. PHP is version 4.2.2-17.
 > what more info do you need?
 >
 > ruud
 >
 >
  > >
  > >
  > > "ruud habets" <otwdummy.RemoveThis@xs4all.nl> wrote in message
  > > news:41371baf$0$10528$e4fe514c@news.xs4all.nl...
  > >
   > >>hi,
   > >>here is my situation:
   > >>
   > >><VirtualHost domain1>
   > >> DocumentRoot /dir1
   > >> ServerName domain1
   > >> DirectoryIndex index.html index.php index.htm index.shtml
   > >> ErrorLog logs/domain1.error
   > >> TransferLog logs/domain1.transfer
   > >> Options Indexes FollowSymLinks
   > >></VirtualHost>
   > >>
   > >><VirtualHost domain2>
   > >> DocumentRoot /dir2
   > >> ServerName domain2
   > >> DirectoryIndex index.html index.php index.htm index.shtml
   > >> ErrorLog logs/domain2.error
   > >> TransferLog logs/domain2.transfer
   > >> Options Indexes FollowSymLinks
   > >></VirtualHost>
   > >>
   > >>domain1 is a LAN
   > >>domain2 is a public domainname
   > >>both sites have access to 1 mysql database on localhost.
   > >>all (database generated pages as well) works well, except:
   > >>after changes to the database inititated by domain2 the database is
   > >>updated correctly, but the resulting page has the URL as if the serving
   > >>domain is domain 1 and not domain 2.
   > >>can somebody tell me how to fix this?
   > >>
   > >>ruud habets
  > >
  > >
  > ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: virtual hosts & mysql database question 
Back to top
Login to vote
otwdummy

External


Since: Sep 02, 2004
Posts: 3



(Msg. 5) Posted: Tue Sep 07, 2004 11:24 am
Post subject: Re: virtual hosts & mysql database question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Niteshade wrote:
 > my best guess is that your system is defaulting to your main site. have you
 > tried putting your lan based domain at the top of the virtual host list? may

ok, i will try that, thnx

 > would bring up your public domain whilst working with the private one. are
 > you using the private domain as a way of updateing the public site?

that's right.
i thought it would be a smart thing to do, but it kept me busy ... Smile


[cut]

   >>>>
   >>>><VirtualHost domain1>
   >>>> DocumentRoot /dir1
   >>>> ServerName domain1
   >>>> DirectoryIndex index.html index.php index.htm index.shtml
   >>>> ErrorLog logs/domain1.error
   >>>> TransferLog logs/domain1.transfer
   >>>> Options Indexes FollowSymLinks
   >>>></VirtualHost>
   >>>>
   >>>><VirtualHost domain2>
   >>>> DocumentRoot /dir2
   >>>> ServerName domain2
   >>>> DirectoryIndex index.html index.php index.htm index.shtml
   >>>> ErrorLog logs/domain2.error
   >>>> TransferLog logs/domain2.transfer
   >>>> Options Indexes FollowSymLinks
   >>>></VirtualHost>
   >>>>
   >>>>domain1 is a LAN
   >>>>domain2 is a public domainname
   >>>>both sites have access to 1 mysql database on localhost.
   >>>>all (database generated pages as well) works well, except:
   >>>>after changes to the database inititated by domain2 the database is
   >>>>updated correctly, but the resulting page has the URL as if the serving
   >>>>domain is domain 1 and not domain 2.
   >>>>can somebody tell me how to fix this?
   >>>>
   >>>>ruud habets
   >>>
   >>>
   >>>
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: virtual hosts & mysql database question 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Virtual Hosts question - I guess I need to know if this is even possible... I have one webserver running apache Virtual Hosts on three different ports. Everything works fine and I can go to each page by specifying the port in my browser (e.g. "http://domain.com:8080"...

Virtual Hosts - Hi everyone, I am new to apache, so if my question is answered in the groups faq, or on the apache web site, feel free to tell me to f**k off and read there. However I have looked through the manual, and cant find any reference to the issues im having...

Virtual hosts and SSL? - Hello I'm trying to setup this apache 1.3 server for virtual hosts, with ssl. I've got the normal port 80 working, but the SSL is a bit of a mess. If I have the SSL pages in the real part of the server, ie, https://www.example.com/fred/index.htm then....

Virtual Hosts? - I'm wanting to use one IP address to host multiple domains, ie web hosting. I assume that "virtual hosts" are the thin I need to focus on here and is this basically a similar concept to Host Headers in IIS 5.0? I'm running Windows 2000 with Apa...

Testing virtual hosts. - I have a ADSL connection, with a number of domains all mapped to the fixed IP address of my ADSL connection. Entries on port 80 are then sent to a machine I have dedicated as just a webserver (192.168.1.10), via the router/firewall which performs NAT. Th...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]