Httpd Help

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Httpd Help

Postby farukh83 » 28. August 2008 09:51

Hi,

I want to add members database it is huge database (Data entry work). We
have slow internet service so we want to do it on localhost.

What i did for it,
I installed Fedora8
Than i installed Webserver "XAMPP"
Now it is working fine.
By default it made web directory "/opt/lampp/htdocs"

I have files in my b2b folder. i have copied my files here,
Do "/opt/lampp/htdocs/b2b"

it is working by http://localhost/b2b


Problem :
I am using mod-rewrite here .htaccess file so it is not working properly.
all files are php but mod-rewrite make it as .html for SEO purpose. this
thing is working on our Server 38.100.22.171 but it is not working on
local server.

Solution:
i found a solution that we should use it any domain name for local host.
For example we should host domain name www.b2b.com (Dummy Domain) and when
we open www.b2b.com so it will open our local files from
"/opt/lampp/htdocs/b2b"

In Short:
How we can set or add any dummy domain name www.b2b.com in httpd.conf so
that it will open our "/opt/lampp/htdocs/b2b" files INSTEAD of REAL
WEBSITE www.b2b.com .


When we open www.b2b.com so it will open our files from our PC
"/opt/lampp/htdocs/b2b"

Note: i know it will work only for our computer/network.


Do i need add dns entry ? in dns file, i mean domain entry? where i can find DNS file ?


Please kindly help me, it is very urgent work for me. Thanks.

Best Regards,
Farrukh Hussain
Http://www.websolpro.com
farukh83
 
Posts: 11
Joined: 28. August 2008 09:48

Postby Nobbie » 28. August 2008 11:32

Simply edit file /etc/hosts and add entry for www.b2b.com:

Code: Select all
127.0.0.1 www.b2b.com


You don't need to restart anything, www.b2b.com immediately points to your local PC.
Nobbie
 
Posts: 8761
Joined: 09. March 2008 13:04

Working

Postby farukh83 » 28. August 2008 15:48

Hi,

Thanks, Now it is working :) but i have another problem, it is going to
http://www.b2b.com/xampp

Can you please tell me how i can set it as
/opt/lampp/htdocs/userinn

Thanks.

Best Regards,
Farrukh Hussain
farukh83
 
Posts: 11
Joined: 28. August 2008 09:48

Working

Postby farukh83 » 28. August 2008 16:14

Hi,

I want when i will open www.b2b.com so it will show files from
/opt/lampp/htdocs/userinn

AND
when i will open www.b2c.com so it will show files from
/opt/lampp/htdocs/b2c


After deleting index.html it is opening main htdocs instead of "userinn"

I have following lines in httpd.conf
DocumentRoot "/opt/lampp/htdocs/userinn"
<Directory "/opt/lampp/htdocs/userinn">


And following lines in host file
127.0.0.1 localhost.localdomain www.b2b.com b2b.com
127.0.0.1 localhost.localdomain www.b2c.com b2c.com
127.0.0.1 localhost.localdomain localhost www.localhost.com
::1 localhost6.localdomain6 localhost6

Your help is very appreciated thanks.

Best Regards,
Farrukh Hussain
farukh83
 
Posts: 11
Joined: 28. August 2008 09:48

Postby Nobbie » 28. August 2008 22:00

Read the documentation about virtual hosts:

http://httpd.apache.org/docs/2.2/en/vhosts/

You need "Name-based Virtual Host".
Nobbie
 
Posts: 8761
Joined: 09. March 2008 13:04


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 3 guests