2017-10-28 124 views
0

我有一个单独的页面,我想为非盈利的志愿者演示,但Heroku部署只是给我的标题错误。文件目录是这样的:错误403 Forbidden:您无法访问此服务器上的简单Heroku版本

--hotlabdemo 
    --assets  
     --javascript 
      home.js 
     --css 
      style.css 
     --images 
      a few images 
    composer.json 
    home.html 
    home.php 

我有另一个页面托管在那里或多或少是相同的事情,但有点不同。 HTML/JS/CSS是不同的,但不应该阻止访问服务器上的“/”。

作为参考,对于页面的PHP和作曲家是

{} 

<?php include_once("home.html"); ?> 

我开了一个支持票与Heroku的,但被告知

"Unfortunately, this appears to be an issue that falls outside the nature of 
the Heroku Support policy. I recommend searching our Knowledge Base or 
asking the community on Stack Overflow for more answers." 

有什么想法为什么我可能被阻止访问该页面?

回答

0

您可以通过在项目的根目录下创建一个文件“Procfile”来解决此问题。 https://devcenter.heroku.com/articles/procfile

注意

Procfile命名和定位

一个Procfile是一个名为Procfile文件。 它应该被命名为Procfile,而不是其他任何东西。例如,Procfile.txt无效。该文件应该是一个简单的文本文件。

该文件必须放置在应用程序的根目录中。如果放置在子目录中,它将不起作用。

Procfile应该定义你想运行PHP服务器,例如

web: vendor/bin/heroku-php-apache2 web/

https://devcenter.heroku.com/articles/getting-started-with-php#define-a-procfile

相关问题