I like to know the best practices of viewing websites on the server that don't have a registered domain or are hosted on a different server. I know the way with the hosts file, but that option doesn't work with clients. Not every one knows how to do it. So what are other "easier" ways of doing this. Do you use subdomains, have a registered test domain that you have only for viewing sites or something else?
Till I said that I know that option, but it doesn't work for clients that don't know a lot about computers, plus on windows 10 it isn't that simple any more because you can't save into the file but you have to create the file somewhere else, do the changes and only then copy it into etc.
Well. what about the most OBVIOUS solution? Like...I don't know...create a subdomain like "dev.example.com" and then later change the domain in ISPConfig to example.com and/or overwrite the existing site.
A different name (dev subdomain or such) can work, but you have to be careful with embedded url's not referencing the temp/staging name. Ie. a site working at dev.whatever.com could break when deployed as www.somethingelse.com. I have had pretty good luck doing this (in wordpress and drupal sites) if you are careful to keep the dev and production hostnames the same string length, then when you move to production, take a database dump, do a string replacement on the dump from old to new name, then load into the production database. Also double-check .htaccess files; likely your html/code files won't have a hostname hard-coded, but a quick grep should find any spots. Depending on how much work you want to put into your side of it, you could probably create a reverse proxy config to do this, eg. say you have 'demo.mydomain.com' for this purpose, you could add a website to your server (just use hosts file changes while you build it), then setup a reverse proxy url of http://demo.mydomain.com/www.customerdomain.com/ to proxy connect to the local ip address and request the right site name. (Might have to edit the hosts file on the webserver, too, I've not actually done that.) A forward proxy would be another option, but again you have to have the client configure their side, which you were trying to avoid.
Hi, I think the easiest would be to create a subdomain like @ZeroEnna said. Its easy and quick to get a working demo. And just keep in mind what @JesseNorell said about hard coding urls