[英]how to access sites without specifying port number in the url, after creating virtual host in Bitnami lampstack for ubuntu 14
Can some one please help me to create a virtual host in Bitnami Lampstack, which is installed on ubuntu 14.0.4, through which I can access my site without specifying port number in the URL as- http://mysite.local
instead of http://mysite.local:8080
? 有人可以帮我在Bitnami Lampstack中创建一个虚拟主机吗,该主机安装在ubuntu 14.0.4上,通过它我可以访问我的网站,而无需在URL中指定端口号as-
http://mysite.local
而不是http://mysite.local:8080
?
I have Bitnami Lampstack 5.3.29 (64 bit) installed on my system (ubuntu 14.0.4). 我的系统(ubuntu 14.0.4)上安装了Bitnami Lampstack 5.3.29(64位)。 I have configured the virtual host file as follows
我已经如下配置虚拟主机文件
<VirtualHost *:8080>
DocumentRoot "/home/qainfotech/lampstack-5.3.29-0/apache2/htdocs/mysite/htdocs"
ServerName mysite.local
</VirtualHost>
which allow me access the home page of my site very easily by the URL http://mysite.loca:8080
but the home page it doesn't redirect properly. 这使我可以通过URL
http://mysite.loca:8080
轻松访问网站的主页,但是该主页无法正确重定向。
So how can I configure virtual host to access my site without specifying port number in the URL ? 那么,如何在不指定URL端口号的情况下配置虚拟主机访问我的站点?
<VirtualHost *:80>
DocumentRoot "/home/qainfotech/lampstack-5.3.29-0/apache2/htdocs/mysite/htdocs"
ServerName mysite.local
</VirtualHost>
Defaut HTTP port is port 80. So when you don't specify a port in your url, you are using port 80. Defaut HTTP端口是端口80。因此,如果您在URL中未指定端口,则使用的是端口80。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.