0

I had experience in setting up linux ubuntu server with apache2. the laravel project is run successfully and everything works accordingly. the same code I applied in centos apache2 and it failed.

eg: simple login post form using html laravel blade is not submited to the backend laravel code when the button is clicked. no idea what is going on. it just redirects to the same login page even the correct crediential is entered correctly. according to the networking showing in google chorme debugging tools.

The Laravel project is within this directory /home/abccom/public_html/abc/public

  • laravel 5.3
  • Centos 7
  • Apache/2.4.46 (cPanel)
  • Cloudflare

anyone can help??

Chrest Koo
  • 31
  • 1
  • 5
  • Are the URLs in the site correctly formed? It's probably not a great idea to have your entire project exposed via the `public_html` directory. – matticustard May 16 '21 at 02:48
  • the url is corroctly formed. when i key in the domain. it opens member login page. eg: abc.com. it redirect to abc.com/member/login – Chrest Koo May 16 '21 at 07:48
  • You're going to need to provide more specifics. Post the code involved. Without more information, your issue could be any one of a million different things. Also, check your Laravel logs and Apache logs for additional information. – matticustard May 16 '21 at 15:27
  • @matticustard thanks for the advise. Can to tell me what can I share in order to solve my problem? I will go through my Laravel logs and Apache logs for additional information. – Chrest Koo May 18 '21 at 15:55
  • Without knowing anything about your app, the thing that stands out (and which I referenced in my first comment) is that your `{laravel}/public` directory does not appear to live at the hosting plaform's web root, which I can only assume is the standard `/public_html`. This is a major red flag as using an alternate structure requires overriding the default behavior of either Laravel or your web server. But you have not given us any details about how either are configured to compensate for this significant discrepancy. – matticustard May 18 '21 at 17:06
  • @matticustard sorry i miss out info for you. my laravel project is within the public_html so far. this is my laravel project directory /home/abccom/public_html/abc/. the public is within this abc laravel project folder as well. I don't know the reason for this "It's probably not a great idea to have your entire project exposed via the public_html directory" mind to share with me? i did follow this link. i change the root directory direct to my /home/abccom/public_html/abc/public https://forums.cpanel.net/threads/change-root-directory-for-the-main-domain.592551/ – Chrest Koo May 22 '21 at 04:30
  • @matticustard "major red flag as using an alternate structure requires overriding the default behavior of either Laravel or your web server" Mind to share with me about the good practice on the structure? – Chrest Koo May 22 '21 at 04:31

0 Answers0