bitnamieclipsephp
我在Windows7中安装了BitnamiWamp堆栈,并试图运行我的eclipse php代码。我在网上找到了一个链接,上面说要添加别名,但这不起作用,如何让代码运行bitnamieclipsephp,php,eclipse,apache,bitnami,Php,Eclipse,Apache,Bitnami,我在Windows7中安装了BitnamiWamp堆栈,并试图运行我的eclipse php代码。我在网上找到了一个链接,上面说要添加别名,但这不起作用,如何让代码运行 http://localhost/greenmugcafe/ 如果我的eclipse工作区位于此处 C:\Users\Robert\Documents\GitHub\greenmugcafe ? 编辑:我找不到任何关于为Bitnami WAMP执行此操作的内容,但我为Bitnami Django堆栈找到了一些 有什么帮助吗
http://localhost/greenmugcafe/
如果我的eclipse工作区位于此处
C:\Users\Robert\Documents\GitHub\greenmugcafe ?
编辑:我找不到任何关于为Bitnami WAMP执行此操作的内容,但我为Bitnami Django堆栈找到了一些
有什么帮助吗?您的代码将从
http://localhost/greenmugcafe/
如果您将localhost的虚拟主机目录更改为C:/Users/Robert/Documents/GitHub/
就我个人而言,我认为最好创建一个名为greenmugcafe.dev的本地域,而不是在localhost域中创建一个文件夹greenmugcafe
如何在WAMP中设置虚拟主机
确保已启用虚拟主机:
/installdir/apache2/conf/httpd.conf
httpd vhosts.conf
的行,并通过删除开头的#来取消注释C:\windows\system32\drivers\etc\
)127.0.0.1 greenmugcafe.dev
的末尾。这会告诉您的计算机,任何值为greenmugcafe.dev
的url都应该路由到127.0.0.1
(也称为localhost)hosts
文件,现在编辑此文件/installdir/apache2/conf/extra/httpd vhosts.conf
/installdir/apache2/conf/extra/httpd vhosts.conf
文件的底部添加greenmugcafe.dev虚拟主机条目,保存并重新启动服务器#greenmugcafe
<VirtualHost *:80>
ServerAdmin webmaster@greenmugcafe.dev
DocumentRoot "C:/Users/Robert/Documents/GitHub/greenmugcafe/"
ServerName greenmugcafe.dev
ErrorLog "logs/greenmugcafe.dev-error.log"
CustomLog "logs/greenmugcafe.dev-access.log" common
<Directory "C:/Users/Robert/Documents/GitHub/greenmugcafe/">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Require all granted
</Directory>
</VirtualHost>
绿色咖啡屋
服务器管理员webmaster@greenmugcafe.dev
DocumentRoot“C:/Users/Robert/Documents/GitHub/greenmugcafe/”
ServerName greenmugcafe.dev
ErrorLog“logs/greenmugcafe.dev error.log”
CustomLog“logs/greenmugcafe.dev access.log”通用
选项索引跟随符号链接
允许超越所有
命令拒绝,允许
要求所有授权
现在将指向C:/Users/Robert/Documents/GitHub/greenmugcafe/
此方法也适用于其他WAMP堆栈,如WAMP服务器和XAMPP
对于linux服务器上启动的网站,我们将更改域名的a记录,以指向服务器IP地址,而不是windows主机文件。然后,我们仍然需要设置虚拟主机,以便服务器能够识别域名并将其指向服务器上的正确文件夹
希望对您有所帮助:-)您的代码将从http://localhost/greenmugcafe/
如果您将localhost的虚拟主机目录更改为C:/Users/Robert/Documents/GitHub/
就我个人而言,我认为最好创建一个名为greenmugcafe.dev的本地域,而不是在localhost域中创建一个文件夹greenmugcafe
如何在WAMP中设置虚拟主机
确保已启用虚拟主机:
编辑/installdir/apache2/conf/httpd.conf
搜索包含httpd vhosts.conf
的行,并通过删除开头的#来取消注释
添加新虚拟主机:
编辑windows系统上的主机文件(通常位于C:\windows\system32\drivers\etc\
)
将以下内容添加到主机文件127.0.0.1 greenmugcafe.dev
的末尾。这会告诉您的计算机,任何值为greenmugcafe.dev
的url都应该路由到127.0.0.1
(也称为localhost)
保存hosts
文件,现在编辑此文件/installdir/apache2/conf/extra/httpd vhosts.conf
在/installdir/apache2/conf/extra/httpd vhosts.conf
文件的底部添加greenmugcafe.dev虚拟主机条目,保存并重新启动服务器
代码如下:
#greenmugcafe
<VirtualHost *:80>
ServerAdmin webmaster@greenmugcafe.dev
DocumentRoot "C:/Users/Robert/Documents/GitHub/greenmugcafe/"
ServerName greenmugcafe.dev
ErrorLog "logs/greenmugcafe.dev-error.log"
CustomLog "logs/greenmugcafe.dev-access.log" common
<Directory "C:/Users/Robert/Documents/GitHub/greenmugcafe/">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Require all granted
</Directory>
</VirtualHost>
绿色咖啡屋
服务器管理员webmaster@greenmugcafe.dev
DocumentRoot“C:/Users/Robert/Documents/GitHub/greenmugcafe/”
ServerName greenmugcafe.dev
ErrorLog“logs/greenmugcafe.dev error.log”
CustomLog“logs/greenmugcafe.dev access.log”通用
选项索引跟随符号链接
允许超越所有
命令拒绝,允许
要求所有授权
现在将指向C:/Users/Robert/Documents/GitHub/greenmugcafe/
此方法也适用于其他WAMP堆栈,如WAMP服务器和XAMPP
对于linux服务器上启动的网站,我们将更改域名的a记录,以指向服务器IP地址,而不是windows主机文件。然后,我们仍然需要设置虚拟主机,以便服务器能够识别域名并将其指向服务器上的正确文件夹
希望有帮助:-)您好。我将“替换为BITNAMI LOCALHOST文件夹”改为“C:/BITNAMI/wampstack-5.4.16-0/apache2/htdocs”(假设反斜杠向前斜杠不重要,只要我保持一致),现在我无法重新启动服务器。有什么想法吗?谢谢斜杠很重要,它们需要向前(/)斜杠。我给了你错误的文件来添加virtualhost代码,这可能就是bitnami没有重新启动的原因。将代码添加到此文件:/installdir/apache2/conf/httpd-vhosts.conf。我可以在httpd.conf中找到的唯一包含您提到的文本的文件是#Include conf/extra/httpd vhosts.conf
,但它位于extra
文件夹中,您说它位于conf
的根目录中?我应该试试哪一个?就是这个,试试conf/extra/httpd-vhosts.conf是的,我试过了,但没用。我滚动到httpd.conf的底部,看到包含“C:\BitNami\wampstack-5.4.16-0/apache2/conf/ssi.conf”
,它是反斜杠和正斜杠的混合体。我需要这样做吗?还有这个AH00094:命令行:'C:\\BitNami\\WAMPST~1.1