How to configure a domain with Xampp?

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

How to configure a domain with Xampp?

Postby MalastiC » 31. October 2008 09:48

Good morning. I installed XAMPP on a dedicated server with Linux. Is working well, but I would like XAMPP could open a domain. Let me explain: I would like to put domain.com in one browser and xampp open that domain.

Is it possible?
What would that do?
My expertise in Linux is 0.

Notes:
Xampp is in a live server.
I have static IP.

Thanks in advance.

PD. I am spanish and i dont speak english. :roll:
MalastiC
 
Posts: 13
Joined: 31. October 2008 09:35

Postby glitzi85 » 31. October 2008 16:05

Open the File /opt/lampp/etc/extra/httpd-vhosts.conf and put this Code inside (you can delete the existing content) and replace example.com with your domain:

Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
   ServerName localhost
   DocumentRoot /opt/lampp/htdocs/xampp
</VirtualHost>

<VirtualHost *:80>
   ServerName example.com
   ServerAlias www.example.com
   DocumentRoot /opt/lampp/htdocs/example.com
</VirtualHost>

<Directory /opt/lampp/htdocs/xampp>
  Order allow,deny
  allow from localhost
</Directory>

<Directory /opt/lampp/htdocs/example.com>
  Order allow,deny
  allow from all
</Directory>


Then execute this command (again replace example.com with your domain):

Code: Select all
mkdir /opt/lampp/htdocs/example.com


Now put your Website in /opt/lampp/htdocs/example.com.

After restarting XAMPP it should work if the DNS-Entry for your Domain is correct.

glitzi
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Postby MalastiC » 01. November 2008 12:30

Good morning. Thank you for your reply and help me.

The File /opt/lampp/etc/extra/httpd-vhosts.conf is:

Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot /opt/lampp/htdocs/xampp
</VirtualHost>

<VirtualHost *:80>
    ServerName eurcvideos.com
    ServerAlias www.eurcvideos.com
    DocumentRoot /opt/lampp/htdocs/eurcvideos.com
</VirtualHost>

<Directory /opt/lampp/htdocs/xampp>
    Order allow,deny
    allow from localhost
</Directory>

<Directory /opt/lampp/htdocs/eurcvideos.com>
    Order allow,deny
    allow from all
</Directory>


When I try to enter the domain www.eurcvideos.com I get always this rute: www.eurcvideos.com/xampp/

Enters the xampp folder and not in the eurcvideos.com folder.

Code: Select all
mkdir /opt/lampp/htdocs/eurcvideos.com


I have done this folder and see who is correct.

Am I doing something wrong?

A greeting and thanks.
MalastiC
 
Posts: 13
Joined: 31. October 2008 09:35

Postby Kristian Marcroft » 01. November 2008 12:50

Hi,

try clearing your browser cache and retry.

Regards,
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby MalastiC » 01. November 2008 12:58

Kristian Marcroft wrote:Hi,

try clearing your browser cache and retry.

Regards,
KriS


:D


Thank you very much. It was that and bring with it several hours ...

Now I have another problem. When turning off the server and does not start just light up. I tried this:
Code: Select all
ln -s /opt/lampp/lampp /etc/init.d/lampp


My server is Gentoo and I think this is not valid for Gentoo.

You know I have to use that command?

Thank you very much.
MalastiC
 
Posts: 13
Joined: 31. October 2008 09:35

Postby Kristian Marcroft » 01. November 2008 13:05

Hi,

I don't have Gentoo,
however just linking it to /etc/init.d/* is not enough.
You have to Link /etc/init.d/lampp to your desired runlevels.

Try something like:
# rc-update add lampp default

Regards,
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby MalastiC » 02. November 2008 11:49

Good Morning.

# rc-update add lampp default



I have done this, I said that the service is updated, but when I "reboot" lampp not start again.

Is there another command?

A greeting,
MalastiC
 
Posts: 13
Joined: 31. October 2008 09:35

Postby Kristian Marcroft » 02. November 2008 12:14

Hi,

no further ideas, as I dont have Gentoo.
Do you see any errors while booting though?

Regards,
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 20 guests

cron