#1
Hi all,

Did anyone ever tried to create new app using other that XAMPP?
I am new in coding and after browsing I found trongate on somebody command in youtube
After watch a few video I tried to test
Somehow if i tested using XAMPP its working fine after the first installation, I mean the "routing_demo"
But if I using my mac and using ServBay web server (https://www.servbay.dev/), I've got HTTP ERROR 404
https://ibb.co/fX1GXkJ

this is my config.php file
https://ibb.co/wwXYTmP

Hope that anyone can help me out
Thanks
#2
Hi jtdoank, the issue here is that ServBay uses Caddy v2.7.6 as its web server and Trongate by default uses Apache. This is why you are seeing an HTTP ERROR 404 message. I had a quick look for you, and it seems Caddy can be configured to use 'rewrite' as Apache does with .htaccess files but I'll leave that to you to work out. An alternative to ServBay is devilbox.org which uses Docker.
#3
I do try using another virtual host
But it seems to have the same result
https://ibb.co/g6S2D2P

and this mu config file
https://ibb.co/nwtqVPc

Thanks ?
#4
Hi Dafa,

Thanks for it and let me work on it

??
#5
Trongate will not work with ServBay by default, no matter what virtual host you set because the webserver works differently from Apache. If you read up on how to configure Caddy to work with rewrites it may work, as others have done to get Trongate to work with Nginx. Or if ServBay can be configured to use Apache.

Please close this thread if you think your question has been answered.

Cheers,
Simon
#6
*** UPDATE *** - Servbay now working with Trongate

Well really, it's Caddy that is now working with Trongate as the rest of Servbay is fine. I was intrigued with Caddy as it is such a great web server. Written in Go, modern, fast, easy reverse proxy, and the auto SSL certificates are fantastic.

My main dev environment is on Windows, so I spent a bit of time converting the '.htaccess' in Trongate which is for the Apache webserver to Caddy.

Enough babble - here is how to set up a Trongate app on Servbay that uses Caddy.

1. Delete the demo host and create a new one - I called mine 'tg.dev'
2. Name - "Trogate App"
3. Domain - "tg.dev"
4. Web Protocol - 'HTTP & HTTPS"
5. SSL - "Self-Signed"
6. Host Type - "PHP" then choose your version install with Servbay, mine was "8.2"
7. Root Directory - "/Applications/ServBay/www/tg"
8. Click on "Custom Configuration" and paste the following:
9. Click 'Save' in the bottom right
10. Goto the Services menu on the left nav pane and restart the Caddy service

Open the Trongate desktop app, create a new app in "/Applications/ServBay/www", and call your app "tg", set your 'BASE_URL' to "https://tg.dev/", note the default MariaDB user name is root, with a password of 'ServBay.dev'.

Then open your new trongate app and it should all work!

Note right now with the Caddyfile above, you can only have one Trongate app. I may look into this further to allow more than one app per domain.

Enjoy and happy coding!

Cheers,
Simon
#7
Terrific,

Thanks a lot ??
#8
hi, thank you for choosing ServBay. install Trongate in ServBay is really easy, just add a new host on ServBay's hosts panel, and pointing the web root to Trongate's public folder (which contains index.php). that's all.

you don't have to write your own rewirte rules.

then you can add the mariadb user through phpmyadmin that cames with ServBay.

keeping development simple is what ServBay strives for.