• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Strange redirect with wrong URL

Javier Fernández

New Pleskian
Hello,
I am having a strange redirect issue, and I couldn't find an answer for this problem. The server is a VPS, and the software is:
Ubuntu 16.04.3 LTS
Plesk Onyx Version 17.5.3 Update #27
Mail server: Postfix

I access plesk from the URL https://plesk.mydomain:8443/ , no problem with that, however, if I enter https://plesk.mydomain/ or http://plesk.mydomain, the address in the browser changes to https://plesk.mydomain/otherstuff and the contents loaded in the browser is the contents of a website hosted in the server, (http://anotherdomain/otherstuff).

I'd rather have plesk redirecting to the proper address (https://plesk.mydomain:8443/) or if not possible, to the host main website (http://www.mydomain), instead of the website of one of our customers. How can I solve this problem? Other than that, we don't have any problem, everything seems to be working OK.

Best Regards
 
- Is the host name set in system settings to plesk.mydomain?
- Is that host name the host's proper name according to /etc/hosts file?
 
Yes, the host name in system settings is plesk.mydomain
There are a few entries in /etc/hosts, the last one is
serverIP plesk.mydomain plesk (if course serverIP is actually an IP, not words).

As I said, I have no troubles to access to plesk control panel if I enter the proper address (including port 8443), my concern is what happens if I forget to enter the port, I don't want it to display the website hosted in a different subdomain, or at least, I'd like to be able to chose which subdomain it will show, that way I would be able to setup a page saying "error, you forgot to add the port", or something.

Best Regards
 
If you want to change the behavior of the default site, you can change the content of the /var/www/vhosts/default/htdocs directory. For example you can create an index.html or index.php file in that directory with a redirect directive that will forward all requests to that default site to the :8443 Plesk port-domain.
 
Hello,
I found the problem, for some reason, the default site for the server IP was the subdomain that was being displayed. I changed it to another site, and problem solved. Thanks for the advices anyway.
 
Back
Top