Please help!!!, does not see the Internet virtual hosts xamp

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

Please help!!!, does not see the Internet virtual hosts xamp

Postby dremor » 23. October 2014 16:37

does not see the Internet virtual hosts xampp - xampp opens his folder htdocs !, but on the LAN sees these hosts!
xampp running on linux mint, dns server - win2003, proxy - zentyal. a couple of days already struggling, do not understand what I'm doing wrong? :cry:
I need to host multiple sites using xampp and the Internet to access it.

Thank you all in advance!
dremor
 
Posts: 5
Joined: 23. October 2014 15:22
Operating System: Linux Mint, Windows 10

Re: Please help!!!, does not see the Internet virtual hosts

Postby Nobbie » 23. October 2014 21:01

Sorry, but its hard to understand anything. WIll you please explain better?
Nobbie
 
Posts: 8780
Joined: 09. March 2008 13:04

Re: Please help!!!, does not see the Internet virtual hosts

Postby dremor » 24. October 2014 02:54

create a virtual host in xampp(httpd-vhosts.conf)

---httpd.conf
Include etc/extra/httpd-vhosts.conf

---content httpd-vhosts.conf
<VirtualHost 127.0.0.2:80>
ServerAdmin mail@site.ru
DocumentRoot "/opt/lampp/htdocs/site.ru/www"
ServerName www.site.ru
ServerAlias www.site.ru
ErrorLog "/opt/lampp/htdocs/www.site.ru/error.log"
CustomLog "/opt/lampp/htdocs/www.site.ru/access.log"
</VirtualHost>

<VirtualHost 127.0.0.2:80>
ServerAdmin mail@site.ru
DocumentRoot "/opt/lampp/htdocs/site2.ru/www"
ServerName www.site2.ru
ServerAlias www.site2.ru
ErrorLog "/opt/lampp/htdocs/www.site2.ru/error.log"
CustomLog "/opt/lampp/htdocs/www.site2.ru/access.log"
</VirtualHost>

---content host
127.0.0.1 localhost
127.0.0.2 www.site.ru
---

in the localhost - site opens at its address www.site.ru directory /opt/lampp/htdocs/site.ru/www
in the localhost - site opens at its address www.site2.ru directory /opt/lampp/htdocs/site2.ru/www

in the internet - site opens at its address www.site.ru directory /opt/lampp/htdocs/
in the internet - site opens at its address www.site2.ru directory /opt/lampp/htdocs/

I need to have:
in the internet - site opens at its address www.site.ru directory /opt/lampp/htdocs/site.ru/www
in the internet - site opens at its address www.site2.ru directory /opt/lampp/htdocs/site.ru/www
---
what am I doing wrong?
dremor
 
Posts: 5
Joined: 23. October 2014 15:22
Operating System: Linux Mint, Windows 10

Re: Please help!!!, does not see the Internet virtual hosts

Postby Altrea » 24. October 2014 08:20

Don't mix IP based and namebased vhosts.
Don't match your vhosts to 127.0.0.2
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8299
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Please help!!!, does not see the Internet virtual hosts

Postby dremor » 24. October 2014 08:44

So it is correct? example, you can, please?
What do I need to be seen a few sites from the Internet?

---content httpd-vhosts.conf
<VirtualHost 127.0.0.1:80>
ServerAdmin mail@site.ru
DocumentRoot "/opt/lampp/htdocs/site"
ServerName site.ru
ServerAlias www.site.ru
ErrorLog "/opt/lampp/htdocs/www.site.ru/error.log"
CustomLog "/opt/lampp/htdocs/www.site.ru/access.log"
</VirtualHost>

---content host
127.0.0.1 localhost
127.0.0.1 www.site.ru
dremor
 
Posts: 5
Joined: 23. October 2014 15:22
Operating System: Linux Mint, Windows 10

Re: Please help!!!, does not see the Internet virtual hosts

Postby Altrea » 24. October 2014 09:53

No.

dremor wrote:<VirtualHost 127.0.0.1:80>

This line only matches if the request is for IP 127.0.0.1 on port 80 (which can never be true for external requests)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8299
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Please help!!!, does not see the Internet virtual hosts

Postby dremor » 24. October 2014 10:21

thank you very much! now everything is fine :D
dremor
 
Posts: 5
Joined: 23. October 2014 15:22
Operating System: Linux Mint, Windows 10

Re: Please help!!!, does not see the Internet virtual hosts

Postby Nobbie » 24. October 2014 10:25

Additionally, you did not define a VirtualHost for localhost (i cannot see any), therefore localhost is unknown for Apache and instead the default VirtualHost (i.e. the first one) is taken.

You MAY mix ip based and namebased VirtualHosts (this is not a problem, you must use different IPs), but as already said, if you use ip based VirtualBox, you should assign the LAN IP instead 127.0.0.1 (or the external WAN IP, if your server is connected directly to the internet instead via a router).

If your server is connected via a router, you also have to activate a port forwarding in your router for port 80 to your server PC.

Finally: Xampp is NOT meant for online access, it is unsafe.
Nobbie
 
Posts: 8780
Joined: 09. March 2008 13:04

Re: Please help!!!, does not see the Internet virtual hosts

Postby dremor » 24. October 2014 12:20

properly configured xampp also not safe?
Zend Server is better?
advise anything?
dremor
 
Posts: 5
Joined: 23. October 2014 15:22
Operating System: Linux Mint, Windows 10

Re: Please help!!!, does not see the Internet virtual hosts

Postby Altrea » 24. October 2014 12:37

dremor wrote:properly configured xampp also not safe?

define "properly configured".

dremor wrote:Zend Server is better?

way better.
But recommend is to install and configure all the single components on your own (most recommend on a Linux system)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8299
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 5 guests