When installing HipHop / HHVM via the official way [ 1 ][ 2 ], and then running the built-in server [ 3 ] from /var/www via
cd /var/www
sudo hhvm -m server
it will render a custom "404 File Not Found" message to the browser, regardless of /var/www's contents when moving to the server's root:
http://111.111.111.111/
However, HipHop will run perfectly when a filename is given, like
http://111.111.111.111/index.php
Filling the index.php with phpinfo() will also show "hiphop" as feedback, indicating that this PHP file is correctly parsed by HipHop.
How to let HipHop's server run index.php (etc.) by default when navigating to the server's root, like Nginx and Apache do ?
According to the documentation , the config.hdf
file has a DefaultDocument
directive. Set that.
对于HHVM 3.0,您可以在ini
配置文件中使用以下命令指定它:
hhvm.server.default_document = index.php
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.