在Windows上安装与配置Mongoose的一般事宜 Mongoose能够作为Windows控制台应用程序启动。
在快捷方式中有一个“Edit config”,可以用它来进行默认配置的修改。 An installer creates shortcuts in the Start menu, most important ones are "Edit config", "Start service" and "Stop service". These are needed when you want to change the default configuration. "Edit config" starts up an editor, where you can tweak any option. Most importantoptions are: root - where your HTML files live. By default, it is set to "C:\", change it to the directory you want. cgi_interp - this must be a full path to the CGI interpreter program. If you use Perl for your CGI files, or PHP, or anything else - please put the full path to perl.exe, or php-cgi.exe, or whatever you are using as CGI interpreter. PHP NOTE! For PHP 5.x and older, the correct CGI interpreter is php-cgi.exe, not php.exe.
在配置文件中,空行或者以“#”开头的行都将被忽略。其他的行必须以合法的option名开始,后面接上空格(数量无所谓),再接上option需要的值。如果需要配置的option没有写上,那么将使用默认值。配置生效需要关闭配置文件,并且重启Mongoose。 This can be done by stopping the service, and starting it again.
关于windows防火墙应注意的问题。 If you have Windows firewall running, it may block web connections to your machine. This means that while you can access your web pages from the machine that runs Mongoose, you may not access them from other computers. To allow web connections to the machine, go to the control panel, windows firewall, add exception, add port, TCP port 80 and TCP port 443.
Advanced uasge Mongoose.exe本身就是个可执行的文件,安装步骤只是把文件压缩包给解压到指定文件夹,然后注册Windows服务。对于官网的3.0,就是一个简单的exe文件。
共享文件: If you wish to share some files really quickly, just copy mongoose.exe into the directory you wish to share, and double-click it. This will runMongoose in console mode, on port 8080. Point your browser to http://your_machine:8080 to see shared files.
运行CGI脚本: Setting cgi_interp option is not the only way of running CGI scripts. You can leave this option unset. In this case, the first line of your CGI script must be #!c:\full\path\to\cgi_interpreter. This allows to run CGI scripts with different CGI interpreters, for example, Perl, PHP, at the same time. 指定访问服务器的特定客户机: It is possible to restrict access to the web server to certain machines only. To do that, set acl option this way: acl -0.0.0.0/0,+machine1, +machine2, where machine1, machine2 are IP addresses of the machines allowed to connect.
指定访问某些文件夹需要密码: It is possible to protect certain folders with password. To do that, you have to create passwords file in that folder. Start command prompt, run following commands: c:\mongoose-2.1\mongoose.exe-A c:\folder\to\protect\.htpasswd mydomain.com user1 password1 给所有需要加密文件夹指定加密文件: It is possible to protect certain folders with password. To do that, you have to create passwords file in that folder. Start command prompt, run following commands: c:\mongoose-2.1\mongoose.exe-A c:\folder\to\protect\.htpasswd mydomain.com user1 password1
在windows下设置PHP:
Here are some basic instructions on how to set up PHP under Mongoose on current versions of Windows (some modifications would be needed for Linux):
short_open_tag = On (to use "<? ?>" instead of "<?php ?>")
max_execution_time = 15
max_input_time = 10
memory_limit = 16M
display_errors = On (turn Off after debugging)
display_startup_errors = On (turn Off after debugging)
log_errors = Off
html_errors = Off
magic_quotes_gpc = Off
extension_dir = "C:\root" (change to your root path)
;extension=php_sqlite3.dll (put extension DLLs in your root)
;extension=php_mysql.dll
date.timezone=US/Eastern (Change to your time zone)
(You can find a list of time zone names in the following PHP program:
http://bluequartz.org/svn/5100R/tags/raq550_OSS_1_0/ui/palette/libPhp/uifc/TimeZone.php)
(Warning--2.8 syntax)
cgi_interp php-cgi.exe
cgi_ext php
<?php
phpinfo();
?>
(Note that the function call "phpinfo()" generates all the needed
HTML for the information page it generates, so nothing else should
go in "info.php".)
|
Windows下配置mongoose
最新推荐文章于 2022-11-09 00:44:33 发布