Testing Sites /~name not working

boredtechie

Verified User
Joined
Apr 6, 2022
Messages
25
Hello,
I used to be able to access all of my sites using https://server/~user

This no longer seems to work on the new DA. I'm using Ubuntu. Is there a new way to access this?

Thanks,
Casey
 
Is there a new way to access this?
No there is still the old way, but maybe it got disabled for some reason.

If you're just using Apache you can use this via SSH:
Code:
cd /usr/local/directadmin/custombuild
./build set userdir_access yes
./build rewrite_confs

This might not work with nGinx or (Open)Litespeed.
 
it security reason.
:D

the hacker can easy scan your Username... or... can scan something that you don't won't show from your domain. but it can be show from this link.
 
It just doesn't work well for today's modern sites that are built using a CMS (like WordPress).

In the olden days, when people were designing their website with straight HTML and when nameserver changes tended to take a day or two to take over, then all of this made a lot more sense.

But now, almost every website is built with WordPress or Joomla or some other CMS. Your domain name - example1.tld - will execute the PHP code for that CMS as the Linux user example1 on the server. But if you're accessing it via a http://serverip/~example1 - then that VirtualHost executes the PHP as the nobody user (? ... not sure what user... but it's not example1), so that can have real ramifications in how functions are done.

Also consider that WordPress uses it's own internal redirect to always redirect the visitor to the site_url specified in the WordPress installation. So going to http://serverip/~example1 will just redirect you to http://example1.tld regardless if example1.tld is resolving to the server or not.

I always thought there was a spot for a browser plugin that would essentially bypass DNS for browser user specified domain names. Essentially act as a hosts file DNS bypass for specific domain names. The user (presumably the owner of the web hosting account that wants to test their website before changing the nameservers) could use the plugin to specify that example1.tld should resolve to aa.bb.cc.dd (the IP address of the hosting server). This way that particular browser would grab the example1.tld from the aa.bb.cc.dd server as if example1.tld was resolving to the aa.bb.cc.dd server. That would seem to solve a lot of these issues. But I'm not smart enough to write such a browser plugin (or maybe one already exists and I'm not aware of it?)
 
It just doesn't work well for today's modern sites that are built using a CMS (like WordPress).
And most other stuff using a database and/or is depending on the real website url, so this also goes for a lot of forum software.
Which is normal, but the userdir access was not intended for this. It's from the older times indeed.
Most importantly is that people can reach their html part of the website until the domain name is propagated through DNS.

As said, it's a bit of a security issue so it's not enabled by default anymore. People who want to setup a CMS should best wait until their domain is propagated anyway.

Even such browser plugin or changing the Windows hosts file, can cause issues sometimes with setting up CMS systems. It's not advisable.
One of these examples is indeed the internal redirect of Wordpress.

Which is why the common advise is, just wait a couple of hours and don't use userdir.
 
Back
Top