简体   繁体   English

基于LAMP的网站的开发环境 - 重定向到服务器默认页面

[英]Development environment for a LAMP-based website - Redirects to Server Default Page

In our current environment, if any changes need to be made to the code, these changes are directly coded and updated to the Live server. 在我们当前的环境中,如果需要对代码进行任何更改,这些更改将直接编码并更新到Live服务器。 GWe would like to set-up a development server where we can test our changes before uploading to the live site. 我们想建立一个开发服务器,我们可以在上传到实际站点之前测试我们的更改。

I have attempted to build a development site locally by installing Apache, PHP & MySQL and copying all the htdocs to the Apache folder. 我试图通过安装Apache,PHP和MySQL并将所有htdoc复制到Apache文件夹来在本地构建开发站点。 However, when I try to access localhost/ it redirects me to the server default page. 但是,当我尝试访问localhost /它将我重定向到服务器默认页面。 Any ideas on why this may be happening? 关于为什么会发生这种情况的任何想法?

Have you setup Apache VirtualHost and configured it for your sites Document Root? 您是否设置了Apache VirtualHost并为您的站点Document Root配置了它?

I would look into your production site and see what's configured. 我会查看您的生产站点,看看配置了什么。

Also note that when you're setting up a dev/prod environment you will need not just PHP/Apache/etc.. install but also any packages/mods/libs that they are using installed as well. 另请注意,当您设置dev / prod环境时,您不仅需要PHP / Apache / etc .. install,还需要安装它们所使用的任何package / mods / libs。

For Example: if you're using Mod-Re-Write with Apache you need to install and enable it 例如:如果您在Apache上使用Mod-Re-Write,则需要安装并启用它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM