用作MAMP起始页URL的index.*文件在哪里? [英] Where is the index.* file that is served as the MAMP start page URL?

查看:81
本文介绍了用作MAMP起始页URL的index.*文件在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图了解MAMP如何管理Apache Web服务器,但找不到作为MAMP起始页的index.*文件.

I'm trying to understand how MAMP manages the Apache web server but I cannot find the index.* file that is being served as the MAMP start page.

不包括虚拟主机配置httpd-vhosts.confApplications/MAMP/htdocs仅包含我自己的站点,因此http://localhost/MAMP/?language=English的配置方式/位置如何?我安装MAMP的首选项显示起始页URL"为/MAMP/,这是另一个目录的别名吗?

The virtual hosts configuration, httpd-vhosts.conf, is not included and Applications/MAMP/htdocs contains only my own site so how/where is http://localhost/MAMP/?language=English configured? The preferences for my installation of MAMP show that the 'Start page URL' is /MAMP/, is that an alias for another directory?

推荐答案

您将在MAMP/bin/mamp中找到所有的起始页"内容(例如,英语页面为MAMP/htdocs >).

Instead of MAMP/htdocs like you might expect, you will find all the "start page" stuff in MAMP/bin/mamp (e.g. the English language page is MAMP/bin/mamp/English/index.php).

这是由于MAMP/conf/apache/httpd.conf中的以下行引起的:

This is due to the following line in MAMP/conf/apache/httpd.conf:

    Alias /MAMP "/Applications/MAMP/bin/mamp"


警告语

A Word of Caution

如果您将MAMP用作快速简便的Web服务器(正如许多博客所建议的那样,由于Apple讨厌地从系统偏好设置"中删除了"Web共享"),那么这些维护页面可用于任何地方的所有人(感谢Allow from all,您将在别名附近的配置文件中看到). 世界上每个人都可以看到完整的php配置并编辑数据库.以下别名也是有问题的.

If you are using MAMP as a quick-and-easy web server (as many blogs recommend, since Apple annoyingly eliminated "Web Sharing" from the System Preferences), then these maintenance pages are available to everyone everywhere (thanks to the Allow from all you'll see in the config file near the alias). Everyone in the world can see your full php configuration and edit your database. The following aliases are also problematic.

    Alias /phpMyAdmin "/Applications/MAMP/bin/phpMyAdmin"
    Alias /SQLiteManager "/Applications/MAMP/bin/SQLiteManager"

您可以尝试锁定MAMP,但是不使用MAMP可能更容易,因为它不打算用于实时网站.正如MAMP网站本身所说:

You could try to lock down MAMP, but it's probably easier to just not use MAMP, since it is not intended to be used for live websites. As the MAMP website itself says:

MAMP主要是作为Macintosh计算机的PHP开发环境创建的,因此不应用作Internet的实时Web服务器.在这种情况下,建议您将Mac OS X服务器与提供的Apache或Linux服务器一起使用.

MAMP was created primarily as a PHP development environment for Macintosh computer and should therefore not be used as Live Webserver for the Internet. In this case, we recommend that you use Mac OS X server with the provided Apache or a Linux server.

这篇关于用作MAMP起始页URL的index.*文件在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆