我获得了一个关于设置 apache2 和 php 以与名为 liferay 的 java CMS 配合使用的教程。问题是这些说明是为 Linux 编写的。有人能帮我更改这些说明以使其适用于 Windows 环境吗?
ssh into the server.
cd /var/www/
sudo mkdir directory name
sudo nano (or vim if you prefer) index.php
Enter this into the text editor.
<?php
echo "Hello World!";
?>
cd /etc/apache2/sites-enabled/
sudo nano (or vim if that's your preference) 000-default
Make sure the first item on the page looks like this...
NameVirtualHost *:80
Make sure the <VirtualHost> directive looks like this...
<VirtualHost *:80>
Save and exit the file.
sudo nano liferay.conf
Make sure the <VirtualHosts> directive looks like this...
Add an alias inside the <VirtualHost> tag.
Alias /apps "/var/www/apps"
Add a <Directory> directive inside the <VirtualHost> tag. It should look like this...
<Directory "/apps/">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
ProxyPass [http://localhost:80/apps/]
</Directory>
Save and exit the file.
Restart the server
/etc/init.d/apache2 restart
诸如目录站点启用之类的内容不存在,等等,所以我在这里遇到了困难。
多谢!
琼斯
答案1
您要查找的文件是 httpd.conf,可能位于 apache 安装的“conf”目录中。您也可以将 httpd-vhost.conf 检查到“conf/extra”目录中。