Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > Bugs > Topic : Adding Domain does not do anything

1


Threaded Mode | Print  

 Adding Domain does not do anything (35 Replies, Read 50581 times)
Ikoz
Group: Member
Post Group: Newbie
Posts: 19
Status:
I am trying to add a couple of domains using the web interface and mapping them to seperate subdirs underneath /www.

One would expect that apache can use the host header from the browser request and map it to the correct directory. But it does not do so. The whole idea is to use one IP address, but depending on the domain name it gets send to different subdirs.

How can I achieve this without putting the subdir into the URL?

THanks
IP: --   

Adding Domain does not do anything
tidus
Group: AMPPS Team
Post Group: Super Member
Posts: 1098
Status:
Hi,

Currently you will have to add an entry to the hosts file of Windows manually. We are working on it and most probably will add this in next version.

E.g:

1. Add the following two lines in hosts file of Windows, generally located in C:\Windows\system32\drivers\etc\ folder

Code
127.0.0.1 domain1.com
127.0.0.1 domain2.com
2. Add the domains domain1.com and domain2.com with different directory path.

Restart Apache, if it doesn't do it automatically.

Then access http://domain1.com & http://domain2.com

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Adding Domain does not do anything
Ikoz
Group: Member
Post Group: Newbie
Posts: 19
Status:
Thanks for the reply. That's exactly what I did. I put both domains into my hosts file  on the client computer, and added both paths to the Domains in the web interface, but calling either http://domain1.com or http://domain2.com will always end in the www root. I am running this on Windows 7. Any other ideas?
Thanks
-Iko
IP: --   

Adding Domain does not do anything
tidus
Group: AMPPS Team
Post Group: Super Member
Posts: 1098
Status:
Hi,

You can try the hard way, refer this post

http://www.softaculous.com/board/index.php?tid=2077&title=Using_multiple_domains

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Adding Domain does not do anything
Ikoz
Group: Member
Post Group: Newbie
Posts: 19
Status:
Thanks for your response. I will try it the "hard" way ;-)
IP: --   

Adding Domain does not do anything
Ikoz
Group: Member
Post Group: Newbie
Posts: 19
Status:
Thanks. That seemed to have worked.
IP: --   

Adding Domain does not do anything
dummy92
Group: Member
Post Group: Newbie
Posts: 3
Status:
I'm on a mac and I have the same problem. I add the domain, but I have to manually update the hosts file. Is there something I have to do with settings or permissions to get this to work?

As a side note, other than having to manually add the host, everything else works fine. It's only a minor inconvenience but it would be nice if the hosts file could be automatically updated.

Thanks,

-Jeff
IP: --   

Adding Domain does not do anything
tidus
Group: AMPPS Team
Post Group: Super Member
Posts: 1098
Status:
Hi,

This feature has been added in AMPPS 1.7 version. If your Enduser Panel has been automatically updated. You should be able to use this feature.

If your AMPPS Enduser Panel is updated you should be able to see "Powered By AMPPS 1.7" in the footer of Enduser Panel i.e http://localhost/ampps

Now in AMPPS while adding a domain, Go to Advance Settings and Select "Add an Entry to Host file". By doing this entry will be created automatically by AMPPS. Also when you delete a domain that entry will be deleted. :)

Please let us know if you're facing any issues. Also let us know if you have any suggestions.

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Adding Domain does not do anything
dummy92
Group: Member
Post Group: Newbie
Posts: 3
Status:
Hi Tidus,

Thanks for the quick response. So, I do have version 1.7. But, interestingly, I don't have the the advanced settings when I go to add a domain. Is these something I need to do to enable this?

By the way, I really love AMPPS. I only use it for a local dev environment, but I feel like it works a lot more smoothly than XAMPP or MAMP. 
IP: --   

Adding Domain does not do anything
tidus
Group: AMPPS Team
Post Group: Super Member
Posts: 1098
Status:
Hi,

Sorry my mistake. Only in Windows, its possible to use that feature without updating the whole package.

You will have to setup a whole new version of Ampps 1.7 from http://www.ampps.com/download.

In fact we would recommend every Mac user to install new version of AMPPS. Because now the new version of AMPPS can be easily updated with just one click as and when the update is available.

Note: Now there are two things in AMPPS 1.7 that gets updated:
1. AMPPS Binary i.e (AMPPS Control Center, PHP, Apache, MySQL, phpMyAdmin, etc) is updated with a click of a button.
2. Softaculous in AMPPS i.e (Enduser/Admin Panel) which is automatically updated even in former versions.


Edited by tidus : April 10, 2012, 6:29 am

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Adding Domain does not do anything
dummy92
Group: Member
Post Group: Newbie
Posts: 3
Status:
Hi Tidus,

Works perfectly now, thanks!
IP: --   

Adding Domain does not do anything
ketan
Group: AMPPS Team
Post Group: Working Member
Posts: 223
Status:
Hi,

Please let us know if you need any further information.

-----------------------
Follow AMPPS on,
Twitter
Facebook
Google+
IP: --   

Adding Domain does not do anything
abgar
Group: Member
Post Group: Newbie
Posts: 13
Status:
Quote From : tidus April 10, 2012, 4:39 am
Now in AMPPS while adding a domain, Go to Advance Settings and Select "Add an Entry to Host file". By doing this entry will be created automatically by AMPPS. .
Let me ask as do not get it: why AMPPS modifies hosts file ?
I am running Apache for few years and I have never modified hosts files - it was not necessary - virtual do, are working with httpd.conf modified.
IP: --   

Adding Domain does not do anything
tidus
Group: AMPPS Team
Post Group: Super Member
Posts: 1098
Status:
Quote From : abgar April 28, 2012, 9:51 pm
Quote From : tidus April 10, 2012, 4:39 am
Now in AMPPS while adding a domain, Go to Advance Settings and Select "Add an Entry to Host file". By doing this entry will be created automatically by AMPPS. .
Let me ask as do not get it: why AMPPS modifies hosts file ?
I am running Apache for few years and I have never modified hosts files - it was not necessary - virtual do, are working with httpd.conf modified.

Hi,

The hosts file helps resolving domain names to IP address. As AMPPS doesn't provide DNS server we are giving an option to add an entry to host file. If user has DNS server configured then they don't have to add an entry.

Edited by tidus : April 30, 2012, 4:17 am

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Adding Domain does not do anything
abgar
Group: Member
Post Group: Newbie
Posts: 13
Status:
Quote From : tidus April 10, 2012, 4:39 am
Please let us know if you're facing any issues. Also let us know if you have any suggestions.
I spent last 2 hours configuring virtual domains and I completely lost  hope.
Added 10 "parked", 10 "added" domains and....whatever I try, every time only www document root content directory is shown with it's subfolders.

Part of my httpd-vhosts.conf looks like this exactly:

####################################

#### example.cc VirtualHost ####

NameVirtualHost example.cc:80
<VirtualHost example.cc:80>
<Directory "c:/server/www/example">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
ServerName example.cc
ServerAlias example.cc
ScriptAlias /cgi-bin/ "c:/server/www/example/cgi-bin/"
DocumentRoot "c:/server/www/example"
ErrorLog "C:/server/apache/logs/example.cc.err"
CustomLog "C:/server/apache/logs/example.cc.log" combined
</VirtualHost>
####################################

#### www.example.cc VirtualHost ####

NameVirtualHost www.example.cc:80
<VirtualHost www.example.cc:80>
<Directory "c:/server/www/example">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
ServerName www.example.cc
ServerAlias www.example.cc
ScriptAlias /cgi-bin/ "c:/server/www/example/cgi-bin/"
DocumentRoot "c:/server/www/example"
ErrorLog "C:/server/apache/logs/www.example.cc.err"
CustomLog "C:/server/apache/logs/www.example.cc.log" combined
</VirtualHost>
I have to be doing something wrong but have no idea what  :??:
IP: --   

Adding Domain does not do anything
abgar
Group: Member
Post Group: Newbie
Posts: 13
Status:
Forgot to mention: entry in hosts file added
IP: --   

Adding Domain does not do anything
jigar
Group: Softaculous Team
Post Group: Newbie
Posts: 27
Status:
Quote From : abgar May 12, 2012, 6:19 pm
Quote From : tidus April 10, 2012, 4:39 am
Please let us know if you're facing any issues. Also let us know if you have any suggestions.
I spent last 2 hours configuring virtual domains and I completely lost  hope.
Added 10 "parked", 10 "added" domains and....whatever I try, every time only www document root content directory is shown with it's subfolders.

Part of my httpd-vhosts.conf looks like this exactly:

####################################

#### example.cc VirtualHost ####

NameVirtualHost example.cc:80
<VirtualHost example.cc:80>
<Directory "c:/server/www/example">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
ServerName example.cc
ServerAlias example.cc
ScriptAlias /cgi-bin/ "c:/server/www/example/cgi-bin/"
DocumentRoot "c:/server/www/example"
ErrorLog "C:/server/apache/logs/example.cc.err"
CustomLog "C:/server/apache/logs/example.cc.log" combined
</VirtualHost>
####################################

#### www.example.cc VirtualHost ####

NameVirtualHost www.example.cc:80
<VirtualHost www.example.cc:80>
<Directory "c:/server/www/example">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
ServerName www.example.cc
ServerAlias www.example.cc
ScriptAlias /cgi-bin/ "c:/server/www/example/cgi-bin/"
DocumentRoot "c:/server/www/example"
ErrorLog "C:/server/apache/logs/www.example.cc.err"
CustomLog "C:/server/apache/logs/www.example.cc.log" combined
</VirtualHost>
I have to be doing something wrong but have no idea what  :??:

Hi,

We have replied to your ticket.
IP: --   

Adding Domain does not do anything
abgar
Group: Member
Post Group: Newbie
Posts: 13
Status:
Is problem fixed in new releases ?
IP: --   

Adding Domain does not do anything
tidus
Group: AMPPS Team
Post Group: Super Member
Posts: 1098
Status:
Quote From : abgar November 27, 2012, 10:31 am
Is problem fixed in new releases ?
Hi,

What issue are you facing ?

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Adding Domain does not do anything
abgar
Group: Member
Post Group: Newbie
Posts: 13
Status:
Please take a look in our previous corespondence. In Ampps 1.7 virtual hosts were created in bad way ( via admin panel ).
IP: --   

Adding Domain does not do anything
abgar
Group: Member
Post Group: Newbie
Posts: 13
Status:
Quote From : abgar November 28, 2012, 12:25 pm
Please take a look in our previous corespondence. In Ampps 1.7 virtual hosts were created in bad way ( via admin panel ).
Ticket no #330123
IP: --   

Adding Domain does not do anything
tidus
Group: AMPPS Team
Post Group: Super Member
Posts: 1098
Status:
Quote From : abgar November 28, 2012, 12:32 pm
Quote From : abgar November 28, 2012, 12:25 pm
Please take a look in our previous corespondence. In Ampps 1.7 virtual hosts were created in bad way ( via admin panel ).
Ticket no #330123

Hi,

We tested creating Domains on local environment they are working fine. We haven't tested it on production environment. It is not recommended to use on production server.

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Adding Domain does not do anything
abgar
Group: Member
Post Group: Newbie
Posts: 13
Status:
In my opinion it is still done in a wrong way.
Ammps creates virtual host as follows:

< VirtualHost example.com:80>
while it should be:
<VirtualHost *:80>

Take a look at Apache examples:
http://httpd.apache.org/docs/2.2/vhosts/examples.html
In no example domain name ( example.com) follows VirtualHost.

Supposely it works for You locally after You modify hosts file, but it is not the right way.
IP: --   

Adding Domain does not do anything
tidus
Group: AMPPS Team
Post Group: Super Member
Posts: 1098
Status:
Hi,

I know. To make domains work locally we had to do these changes.

We tried <VirtualHost *:80> but it redirected us to localhost

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Adding Domain does not do anything
abgar
Group: Member
Post Group: Newbie
Posts: 13
Status:
I see, but this spoiled acting as server in open internet.
Strange that modification of system hosts file did not work for You.
How You use DNS in Your LAN ? I think this might be a problem.

So I suggest as follows: in admin panel ( where domains are created ) add a check box: if a domain is to be for local network or open net and then create entries in vhost. conf accordingly.
IP: --   

Adding Domain does not do anything
abgar
Group: Member
Post Group: Newbie
Posts: 13
Status:
Quote From : tidus November 29, 2012, 11:23 am
We tried <VirtualHost *:80> but it redirected us to localhost
I have an idea  :D
Tell me please how is You test server configured in Your LAN.
I bet, that:
1. Server has private IP which is NATed to public address on the router
2. Server is connected to the same router interface as rest of Your computers
3. All computers and server are in the same private address range network

Am I right ?
IP: --   

Adding Domain does not do anything
abgar
Group: Member
Post Group: Newbie
Posts: 13
Status:
I suspect, that Your test environment is as I described above, so this is the reason why <VirtualHost *:80> does not work for You.
You should connect Your server to another/separate router interface then NAT will work as it should.
IP: --   

Adding Domain does not do anything
abgar
Group: Member
Post Group: Newbie
Posts: 13
Status:
I am shurely not server guru but network routing and shaping is my job :)
IP: --   

Adding Domain does not do anything
tidus
Group: AMPPS Team
Post Group: Super Member
Posts: 1098
Status:
Hi,

Yes. I will say it again, AMPPS is for local development. The way it is working now is for "local network". All the changes made in httpd-vhosts.conf are handled by AMPPS and will be rebuild by it. Configuration built by it should work in local network.

We might add an option as you have suggested.

In case this feature is not added you can create a conf file manually as you are doing now. :)

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Adding Domain does not do anything
abgar
Group: Member
Post Group: Newbie
Posts: 13
Status:
Quote From : tidus December 7, 2012, 11:25 am
Hi,

Yes. I will say it again, AMPPS is for local development. The way it is working now is for "local network".

We might add an option as you have suggested.

In case this feature is not added you can create a conf file manually as you are doing now. :)
I know  :P
Adding an option would be great. After some hardenings made by our crew AMPPS works great for us for over 6 months in "open" Internet.
IP: --   

Adding Domain does not do anything
warpieke
Group: Member
Post Group: Newbie
Posts: 45
Status:
Quote From : abgar November 29, 2012, 10:14 am
In my opinion it is still done in a wrong way.
Ammps creates virtual host as follows:

< VirtualHost example.com:80>
while it should be:
<VirtualHost *:80>

Take a look at Apache examples:
http://httpd.apache.org/docs/2.2/vhosts/examples.htmlIn no example domain name ( example.com) follows VirtualHost.

Supposely it works for You locally after You modify hosts file, but it is not the right way.
this is not trueampps if you make 2 domains is will read it in vhost as localhost Always.if you make a manual change in this file like  <virtual blabla:80 and if you restart ampps server it will retun vhosts automatic to the localhost and if you setup in there 10 subdomains it all return to localhost Always modrewrite it automatic in in your system of windows host file as 127.0.0.1 blabla.COM and ect.. the only thing you can do is make a copy of vhost en http.conf and set up your stuff first in there. if you make in ampps 10 subdomains and and you deleted 1 of them than ampps will return back to the localhost and not to * so make u your copy of all your stuf and replace the localhost to that * and if you make change just place the right one back over the vhost , only problem dont make change at the server domains or whatever of it will turn back to localhost. all virtual host must be like *  but ampps right them to localhost whatever you do on you script all domains will Always change to localhost and this is wrong. so like i say make copy of your stuf and replace it after restart to * if you check now with webpagecheck or whatever server is find

-----------------------
What i dont K'now must be born...
ON internet from 88/89 , working with computers from the year 1982 c64 , comodore , amiga and ect bbs  :xd:
IP: --   

Adding Domain does not do anything
cautbur
Group: Member
Post Group: Newbie
Posts: 1
Status:
I have a possible solution that work for me, but i am not sure, i have to test more (in order to check that aplication installations and other thing work well).

I define Vitual host with <VirtualHost *:80> like you say.

But i also edit C:\Ampps\apache\conf\httpd.conf beacuse there is defined a VirtualHost rule for Ampss

This rule start with <VirtualHost 127.0.0.1:80>

I changed also to <VirtualHost *:80>

Now seems that name resolving are working well. I think that rule is readed before apache reads the other ones because we are editing windows host to point 127.0.0.1 for every domain that we create. So all our domains will enter to this rule first without check others rules. With my change now checks all rules.
IP: --   

Adding Domain does not do anything
warpieke
Group: Member
Post Group: Newbie
Posts: 45
Status:
Quote From : cautbur September 26, 2013, 8:57 am
I have a possible solution that work for me, but i am not sure, i have to test more (in order to check that aplication installations and other thing work well).

I define Vitual host with <VirtualHost *:80> like you say.

But i also edit C:\Ampps\apache\conf\httpd.conf beacuse there is defined a VirtualHost rule for Ampss

This rule start with <VirtualHost 127.0.0.1:80>

I changed also to <VirtualHost *:80>

Now seems that name resolving are working well. I think that rule is readed before apache reads the other ones because we are editing windows host to point 127.0.0.1 for every domain that we create. So all our domains will enter to this rule first without check others rules. With my change now checks all rules.
yes thats treu , in vhost all setups inside ampps will always stay like 127.0.0.1:80 and online your domains or subdomains will not work , that a bug in ampps and its still a bug...

the only way is make your domains and subdomains in the  C:\Ampps\apache\conf\httpd.conf and it will work like a charme if you wanna run multi domains or subdomains....

thats where my vhost are running on in httpd.conf , its the only working way...


-----------------------
What i dont K'now must be born...
ON internet from 88/89 , working with computers from the year 1982 c64 , comodore , amiga and ect bbs  :xd:
IP: --   

Adding Domain does not do anything
tidus
Group: AMPPS Team
Post Group: Super Member
Posts: 1098
Status:
Hi,

It is not a bug, we don't support production environment yet.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Adding Domain does not do anything
warpieke
Group: Member
Post Group: Newbie
Posts: 45
Status:
Quote From : tidus September 27, 2013, 6:29 am
Hi,

It is not a bug, we don't support production environment yet.
ok i understand that , no big deal , if i make let say a new domain or subdomain , , in ampps environment it write it down automatic under httpd.conf , i have make my self a new rule for it.
and thats easy to make that rules , its better than write automatic in vhost , all domains there will not work online.
but in my rules it is writing un httpd.conf with <virtual host> * automatic and its alot better that way..

the only problem with ammps is if you make whatever domain it makes it automatic in vhost under 127.0.0.1 but its better that you re-development it to making automatic to * and than you have the perfect ammps  :D
but this is not working ,,, why not change it you have the developpers for it


-----------------------
What i dont K'now must be born...
ON internet from 88/89 , working with computers from the year 1982 c64 , comodore , amiga and ect bbs  :xd:
IP: --   

Adding Domain does not do anything
warpieke
Group: Member
Post Group: Newbie
Posts: 45
Status:
Quote From : jigar May 14, 2012, 6:07 am
Quote From : abgar May 12, 2012, 6:19 pm
Quote From : tidus April 10, 2012, 4:39 am
Please let us know if you're facing any issues. Also let us know if you have any suggestions.
I spent last 2 hours configuring virtual domains and I completely lost  hope.
Added 10 "parked", 10 "added" domains and....whatever I try, every time only www document root content directory is shown with it's subfolders.

Part of my httpd-vhosts.conf looks like this exactly:

####################################

#### example.cc VirtualHost ####

NameVirtualHost example.cc:80
<VirtualHost example.cc:80>
<Directory "c:/server/www/example">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
ServerName example.cc
ServerAlias example.cc
ScriptAlias /cgi-bin/ "c:/server/www/example/cgi-bin/"
DocumentRoot "c:/server/www/example"
ErrorLog "C:/server/apache/logs/example.cc.err"
CustomLog "C:/server/apache/logs/example.cc.log" combined
</VirtualHost>
####################################

#### www.example.cc VirtualHost ####

NameVirtualHost www.example.cc:80
<VirtualHost www.example.cc:80>
<Directory "c:/server/www/example">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
ServerName www.example.cc
ServerAlias www.example.cc
ScriptAlias /cgi-bin/ "c:/server/www/example/cgi-bin/"
DocumentRoot "c:/server/www/example"
ErrorLog "C:/server/apache/logs/www.example.cc.err"
CustomLog "C:/server/apache/logs/www.example.cc.log" combined
</VirtualHost>
I have to be doing something wrong but have no idea what  :??:

Hi,

We have replied to your ticket.

first of all you making all your stuff under root thats wrong...
why , all domains and subdomains will making a new map for that domain or subdomain under the originall root and that my friend is not so good lol...

let me help you to setup the perfect virtual host in ampps...

www.example.cc VirtualHost ####

NameVirtualHost *:80
<VirtualHost www.example.cc:80>
<Directory "c:/server/www.example.cc">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
ServerName www.example.cc
ServerAlias example.cc
ScriptAlias /cgi-bin/ "c:/server/www.example.cc/cgi-bin/"
DocumentRoot "c:/server/www.example.cc"
ErrorLog "C:/server/apache/logs/www.example.cc.err"
CustomLog "C:/server/apache/logs/www.example.cc.log" combined
</VirtualHost>


if you see my virtual its not writing in the root and all domains have there root
that how you must do it...
with all domains and subdomains and it will work like a charme  :D


-----------------------
What i dont K'now must be born...
ON internet from 88/89 , working with computers from the year 1982 c64 , comodore , amiga and ect bbs  :xd:
IP: --   

« Previous    Next »

Threaded Mode | Print  

1


Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is September 3, 2014, 7:07 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:1.877