You must specify exactly what you’d like to access (such as “ rather than “test.test”) Make sure that your URL is correct: since NGINX automatic redirects are no longer working. If you only see the Plesk default page make sure your subscription is setup to point at the correct IP address. Check with ifconfig what your IP address is and tweak /etc/hosts accordingly. However, if your server isn’t running, or the IP has changed then you’ll receive a blank page instead. If a domain exists in the real world (like ) your tweaked configuration will override this and display your server instead. You can now test websites with the power of Plesk without having to buy real server resources. There’s a handy tool called Hostbuddy which makes editing and flushing the file a breeze – check it out:Īll that remains is to setup as a domain in Plesk and install some content – as if it was a real server on the real internet. You can add as many of your own domains as you like to the bottom of this file, including other IP addresses for other servers on your network. Test this by pinging the domain in the terminal session – it should return your server’s IP. Now when you try to visit it will resolve to your local server and display the Plesk default page. Thanks to Manski for this tip – read his detailed article here. Now make your Mac reload this configuration with the following command: If you’re not familiar with vi: hit “a” to enter edit mode, hit “esc” to stop editing and enter “SHIFT Z Z” to save the file. Obviously replace 11.22.33.44 with the IP of your actual server. ![]() # localhost is used to configure the loopback interface Make sure you leave what you have in place and add the following lines to the bottom of this file: This will request your Mac’s root password and show you a default configuration. Here’s how I’d do that in a local Terminal session: For our example, I’d like resolve to my own IP address (say 11.22.33.44). To override your own local server’s IP address we can tweak /etc/hosts and define anything we like. Plesk in turn would receive such a request and return the relevant website data. That’s how it finds which IP to connect with so that it can display websites. Tweaking your Mac’s hosts fileīy default your Mac will reach out to its default DNS server to resolve domains. You can easily switch it back on with the same command. The second line will make it stick on subsequent boots we can use. Since I’m on my local network without evildoers attached, let’s switch it off: ![]() Those are on and will filter many requests that look fishy and should be left running on a production server. Thanks to Ivan from Parallels and Jamie from Urtechs for this tip: All we need to do here is to switch off iptables. Out of the box all I get is a blank screen when I access the Plesk GUI using or. Plesk is already installed and ready to rock – all I need is a way to gain web access and setup domains that need to resolve properly. This can be my trusty old NC10 netbook, or a virtual machine running on Parallels Desktop on your Mac (I’ve explained how to set this up here: ). In this example I’ve got a dedicated CentOS instance on my local network. It’s not as easy as I thought, which is why I took some notes on how to do it. Whether you’re running Plesk on a dedicated machine on your network or in a virtual environment, you’ll want to setup test domains and work with them as if they were live – just like it was running in a data centre.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |