doujiao7520 2017-01-15 02:19
浏览 107

无法访问heroku webapp网址

Summary: When i upload my php app to heroku, i can't access the URL.

So i started building an android app that would need to put text and images into a database and retrieve from said database. I have chosen to use the heroku to host my applications back-end, and database. I created an app on heroku and added the clearDB add-on, so i could use MySQL for the database. My web service is built with PHP and this is where the SQL commands are run. The MySQL is currently connected with my clearDB online database. And when i try this PHP script on my local machine, it works perfectly. And my database is updated accordingly. Here is the response when i try to insert an already inserted username:

Success when running on localHost

Well instead of running on localHost, i would like to have the the app sitting on heroku so any mobile device can access it. when i upload it to my heroku app and click on the app url is says

"Forbidden You don't have permission to access / on this server."

Is it possible to do what i'm trying to do with heroku? If it is, where could the problem be coming from and if not can you recommend any other service that would make this process smoother.

Heroku Logs

-----> PHP app detected

>-----> Bootstrapping...

>-----> Installing platform packages...

NOTICE: No runtime required in composer.lock; using PHP ^5.5.17

 - apache (2.4.20)
 - nginx (1.8.1)
 - php (5.6.29)

-----> Installing dependencies...
 Composer version 1.2.4 2016-12-06 22:00:51

-----> Preparing runtime environment...
 NOTICE: No Procfile, using 'web: vendor/bin/heroku-php-apache2'.

-----> Checking for additional extensions to install...

-----> Discovering process types

Procfile declares types -> web

-----> Compressing...
Done: 13.5M

-----> Launching...

Released v4
https://datacollectortest.herokuapp.com/ deployed to Heroku

Thank you.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 h5唤醒支付宝并跳转至向小荷包转账界面
    • ¥15 算法题:数的划分,用记忆化DFS做WA求调
    • ¥15 chatglm-6b应用到django项目中,模型加载失败
    • ¥15 武汉岩海低应变分析软件,导数据库里不显示波形图
    • ¥15 CreateBitmapFromWicBitmap内存释放问题。
    • ¥30 win c++ socket
    • ¥30 CanMv K210开发板实现功能
    • ¥15 C# datagridview 栏位进度
    • ¥15 vue3页面el-table页面数据过多
    • ¥100 vue3中融入gRPC-web