temp adress for addon domains

Do you want to do the research on how to make that change in apache for some lookups and not others? It's not as easy as you might think. It may be doable, and I, for one, look forward to the results of your research :).

Jeff
 
Hehe,

I'm not an apache expert myself, but one of my admins, is pertty close to being a genious. Let me see if I can get him in here and give us a hand :)

Cheers :eek:
 
Do you want to do the research on how to make that change in apache for some lookups and not others? It's not as easy as you might think. It may be doable, and I, for one, look forward to the results of your research :).
Could you give me an example of what apache changes you have in mind?
I might be able to help ;)
 
Perhaps the poster could give you better suggestions.

Request is for using /home/user/domains for domains using domain names for resolution, and home/user/shortcuts for domains using IP#s instead of domain names for resolution.

Jeff
 
Request is for using /home/user/domains for domains using domain names for resolution, and home/user/shortcuts for domains using IP#s instead of domain names for resolution.
How about using domain instead of IP address?

1. Register a new domain (or subdomain) that will be used to access user accounts. Let's call it EXAMPLE.COM
2. Configure wildcard DNS record for example.com so that anything.example.com or even anything.anythingelse.example.com resolves to your server's main IP.
3. Create a custom apache template virtual_host.conf (or virtual_host2.conf) where this line
PHP:
ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES|
is replaced with
PHP:
ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES| |DOMAIN|.example.com
Now, when you create a new hosting account with 2 domains, for example, for mydomain.com and myotherdomain.com they can be accessed as mydomain.com.example.com and myotherdomain.com.example.com.
 
Hi!
Can you modified the text of default message that DA send to new user with link for access to domain until the domain is resolved?

example: IP-ADDRESS/~username/domain.ext

Actually the link is: IP-ADDRESS/~username but if I follow it, the result is "page not found"

bye!
fmortara
 
Hi!
Can you modified the text of default message that DA send to new user with link for access to domain until the domain is resolved?

Yes. Interesting that the link is called "Edit User Message" in the create new user dialog box.
 
Ok guys you threw me for a loop on this one. Didn't see it coming and it hit me like a Mac truck.

John, rather than just old_public_html_link=1 or 0 how about if we made it a switch at setup as well? Maybe "Preview Multi-Domains" and have the old_public_html setting decide what the default is? Myself I don't like using ~username at all. Opens up security risks and causes problems with our PCI Compliance testing.

The main problem with the new structure is that it breaks various scripts that don't honor that .htaccess file and/or the way the syms are setup. Specifically our Miva Empresa stopped working and after hammering on Miva Engineering for an hour I finally found the issue.

But old_public_html_link=1 works for now. Just don't stop supporting it!

BigWil
 
Last edited:
Myself I don't like using ~username at all. Opens up security risks and causes problems with our PCI Compliance testing.
We don't use ~username either, but how exactly do you think it introduces security risks? Just curious.
 
Somebody views their web site with ~username. They click a link going to another web page. Now their username is in the server logs of the other server.

Another: They click a link to another web page. The other web page tracks the referrer header. Now even somebody without root access to the other server has the username.

Another: Many referrers are in webalizer stats which have been made publicly viewable and are indexed by google. Now anybody who uses google can happen upon the username.

With the username one can then launch a dictionary attack on the server to try to guess the password.
 
How about using domain instead of IP address?

1. Register a new domain (or subdomain) that will be used to access user accounts. Let's call it EXAMPLE.COM
2. Configure wildcard DNS record for example.com so that anything.example.com or even anything.anythingelse.example.com resolves to your server's main IP.
3. Create a custom apache template virtual_host.conf (or virtual_host2.conf) where this line
PHP:
ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES|
is replaced with
PHP:
ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES| |DOMAIN|.example.com
Now, when you create a new hosting account with 2 domains, for example, for mydomain.com and myotherdomain.com they can be accessed as mydomain.com.example.com and myotherdomain.com.example.com.

This is a really great idea, and would mitigate all of the problems associated with using ~username.

I came from using H-Sphere (and haven't looked back), but I sorely missed how H-Sphere handles temporary access domains. They set up a code as the third level domain for each domain in the account. They looked like:

(where the web host domain is "hosterdomain.com"):
c2984.hosterdomain.com
c8934.hosterdomain.com

Etc.

The solution above is sexier though, in that it makes more sense to the end user... to access my domain before it propagates, simply do myotherdomain.com.example.com BRILLIANT!
 
The solution above is sexier though, in that it makes more sense to the end user... to access my domain before it propagates, simply do myotherdomain.com.example.com BRILLIANT!
Thank you :)

BTW, you can use |USER|.example.com instead of |DOMAIN|.example.com for accounts with 1 domain.
 
Last edited:
Webcart, in attempting to test your suggestion on my system, I find that it's not working.

I've looked and looked for where DA puts the custom virtual host files that get generated based on the template... do you know where these are saved? From there I can check to see if things are happening as they should.
 
Webcart, in attempting to test your suggestion on my system, I find that it's not working.

I've looked and looked for where DA puts the custom virtual host files that get generated based on the template... do you know where these are saved? From there I can check to see if things are happening as they should.

First, make sure you create a correct custom template. For Apache 1.3.x it's "virtual_host.conf" while for Apache 2.x it's "virtual_host2.conf".

Once you create a custom template, your changes will be applied for newly created domains only. In order to rewrite configs for already existing domains, execute
PHP:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
service httpd stop
service httpd start
Main Apache configuration file is /etc/httpd/conf/httpd.conf. Follow its includes to find out domain specific VirtualHost configurations.

If your server has been installed without custombuild, you will find a bunch of these lines at the end of /etc/httpd/conf/httpd.conf:
Include /usr/local/directadmin/data/users/USERNAME/httpd.conf

For custombuild install, check /etc/httpd/conf/extra/directadmin-vhosts.conf file.
 
Wow, now that's what I call a helpful answer.

Since I do have custombuild installed, checking /etc/httpd/conf/extra/directadmin-vhosts.conf found me the conf file I was looking for.

I have a new box with a fresh install set up just to test this, with a (real) domain: jobtasker.com

I added an account domain "testing.com", and I do indeed see the conf file generate correctly:

ServerAlias www.testing.com testing.com testing.com.jobtasker.com

But http://testing.com.jobtasker.com/ doesn't work (page cannot be displayed). I don't think it should matter that "testing.com" isn't a real domain, right? Since for the purposes of this test it's not being accessed directly (the perfect test since this is how it would be in real life).

It might be a propagation issue though, since digging testing.com.jobtasker.com yields positive results... I guess I'll wait a few hours and try again.
 
Back
Top