virtualhost problem, not working

Issues related to configuring your network
Post Reply
arawn45
Posts: 1
Joined: 2022/07/03 14:42:21

virtualhost problem, not working

Post by arawn45 » 2022/07/03 14:48:26

hello,
i am a new user of centos7 and i installed synology on virtual machine. centos 7 works well. my site works well with local ip address 192.168.1.54, but i would like to meter in the browser mysite/index.php instead of 192.168.1.54/index.php ....

I tried a lot of things nothing works. Thanks for your help

Christophe

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: virtualhost problem, not working

Post by TrevorH » 2022/07/04 11:37:19

You would need to add the name/ip to DNS or to the hosts file on the system that wants to connect to 'mysite'.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: virtualhost problem, not working

Post by jlehtone » 2022/07/04 16:21:07

Indeed. When you type "mysite/index.php" on your browser, the browser/the machine where the browser runs has to first resolve the name (mysite) into IP address (192.168.1.54). Then the browser sends a HTTP request to machine 192.168.1.54. The HTTP server is in no way involved in this.

AFAIK, the "mysite/index.php" will be within the request, so that the HTTP server can do something additional. For example, when both names "mysite" and "ourweb" do point to 192.168.1.54, the server can send different content depending on whether you wrote "mysite/index.php" or "ourweb/index.php".
arawn45 wrote:
2022/07/03 14:48:26
i am a new user of centos7 and i installed synology on virtual machine.
The way you say that creates impression that you have a CentOS 7 machine and you have added a virtual machine guest on that CentOS 7 host. Furthermore, that the VM runs "synology". AFAIK, Synology is a NAS OS and thus linked to Synology hardware. I doubt one installs Synology OS into a VM. Besides, if you have CentOS 7 host and ask about access to HTTP server that is in that host, then why mention any VMs at all?

Perhaps you have Synology NAS host and have installed CentOS into VM on that NAS?

If you want everyone on your site to be able to type "mysite", i.e. that every machine on your site is able to resolve that name, then you ideally have a DNS server that can do that for everyone on your site. This again has nothing to do with the HTTP server.

Post Reply