[英]Ubuntu - How direct example.com/opencart/index.php to http://example.com/ and www.example.com?
I just created a website on VPS using Ubuntu and installed OpenCart. 我刚刚使用Ubuntu在VPS上创建了一个网站,并安装了OpenCart。 When i open it appears like this, http://example.com/opencart/index.php . 当我打开时,它看起来像这样, http://example.com/opencart/index.php 。 Is there a way to shorten or direct to http://example.com and www.example.com ? 有没有一种方法可以缩短或定向到http://example.com和www.example.com?
Maybe i missed some setting that i had to do. 也许我错过了一些我必须要做的设置。 Please someone help me step by step to solve this problem, and because i just learned to create a website. 请有人逐步帮助我解决此问题,并且因为我刚刚学会了创建网站。
Thank you, 谢谢,
I Wayan Arthana I Wayan Arthana
you can set the virtual host blow: 您可以设置虚拟主机打击:
Apache: 阿帕奇:
<VirtualHost *:80>
DocumentRoot "/home/xxx/opencart"
ServerName myvirtualhost.com
DirectoryIndex index.html index.php
<Directory "/home/xxx/opencart">
Options -Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ErrorLog "logs/myvirtualhost.com-error.log"
CustomLog "logs/myvirtualhost.com-access.log" common
</VirtualHost>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.