Ubuntu-如何将example.com/opencart/index.php引导到http://example.com/ 还有www.example.com?
我刚刚用Ubuntu在VPS上创建了一个网站,并安装了OpenCart。当我打开它时,它看起来像这样。有没有办法缩短或直接访问和www.example.com 也许我错过了一些我必须做的设置。请有人帮助我一步一步地解决这个问题,因为我刚刚学会创建一个网站 谢谢,Ubuntu-如何将example.com/opencart/index.php引导到http://example.com/ 还有www.example.com?,php,web,ubuntu-16.04,vps,opencart-3,Php,Web,Ubuntu 16.04,Vps,Opencart 3,我刚刚用Ubuntu在VPS上创建了一个网站,并安装了OpenCart。当我打开它时,它看起来像这样。有没有办法缩短或直接访问和www.example.com 也许我错过了一些我必须做的设置。请有人帮助我一步一步地解决这个问题,因为我刚刚学会创建一个网站 谢谢, I Wayan Arthana您可以设置虚拟主机: 阿帕奇: <VirtualHost *:80> DocumentRoot "/home/xxx/opencart" ServerName myvir
I Wayan Arthana您可以设置虚拟主机: 阿帕奇:
<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>
DocumentRoot“/home/xxx/opencart”
ServerName myvirtualhost.com
DirectoryIndex.html index.php
选项-索引跟随符号链接
不允许超限
命令允许,拒绝
通融
ErrorLog“logs/myvirtualhost.com error.log”
CustomLog“logs/myvirtualhost.com access.log”通用
谢谢你的回答,我应该为“/home/xxx/opencart”填写什么?你这样说是什么意思/var/www/html还是其他?你的服务器是什么?如果是apache,您可以编辑文件:/usr/loca/apche/etc/httpd.confApache2,这是我的服务器。您应该编辑配置文件。路径可能是/usr/loca/apche/etc/httpd.confOk谢谢lyq,我现在想试试。如果我发现错误,你能再帮我一次吗:)