Hosting a GO Web Application - MiniFlux
Hi, We are trying to host the Go application called "Mini Flux" - https://miniflux.app/
However, we are encountering a problem using the "Application Manager" in cPanel. It isn't detecting the app as being "Generic" and it's just responding with a 403 Forbidden page. We are using the latest version of ea-apache24-mod-passenger - 6.0.23:
Installed Packages
Name : ea-apache24-mod-passenger
Epoch : 1
Version : 6.0.23
Release : 1.el9.cloudlinux
V6 of Phusion Passenger should support generic language - https://www.phusionpassenger.com/docs/advanced_guides/gls/
I have also been reviewing the following Go guide in the documentation - https://www.phusionpassenger.com/docs/advanced_guides/gls/go.html I am still unable to get it working. We are using Alma Linux 9 with Cloud Linux.
We created a new configuration file - /etc/apache2/conf.d/userdata/ssl/2_4//user/miniflux.example.com/go.conf
It includes - `PassengerStartupFile "env PORT=$PORT ./main.go -c miniflux.conf"`
The default configuration (/etc/apache2/conf.d/userdata/ssl/2_4//user/miniflux.example.com/MiniFlux.conf) includes:
`<Location "/">
<IfModule mod_passenger.c>
PassengerAppEnv "production"
PassengerEnabled on
PassengerBaseURI "/"
PassengerAppRoot "/home/user/miniflux.example.com"
PassengerAppGroupName "user - MiniFlux"
PassengerRuby /usr/bin/ruby
PassengerPython /usr/bin/python3.9
PassengerNodejs /opt/cpanel/ea-nodejs16/bin/node
</IfModule>
</Location>
<Directory "/home/user/miniflux.example.com">
Allow from all
Options -MultiViews
Options -Indexes
Require all granted
</Directory>`
That all being said, if I add app.js to the directory it loads the correct JS file and displays "Hello World" on the screen. It completely errors out if I have the app.js and the PassengerStartupFile set. (Since it's trying to load the go file with Node.)
Does anyone happen to have anymore information on how I can go about hosting the MiniFlux project on cPanel and WHM? I do have root access but I am hesitant on creating a systemd or supervisors configuration. It should "just work". lol
-
Hey there! Our support for the actual applications themselves besides the basic "hello world" test is limited, but I would recommend submitting a ticket for this issue to see if our team can find anything that could be causing those 403 errors!
0 -
Hey CPRex,
You're right, I should take a step back and try the normal "Hello World" application. Good call. However, that didn't seem to help at all. I followed the Phusion Passenger guide on using the Go Lang - https://www.phusionpassenger.com/docs/advanced_guides/gls/go.html
After building and running the application, it worked locally in the console. I could make a curl request to the URL. When I updated the configuration and tried to run Phusion Psssenger, I still received this in the Apache 2 error_log - "[Fri Nov 15 12:48:44.037110 2024] [autoindex:error] [pid 3462315:tid 3462610] [client IP] AH01276: Cannot serve directory /home/user/miniflux.example.com/: No matching DirectoryIndex (index.php,index.php8,index.php7,index.php5,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.jp,index.phtml,index.shtml,index.xhtml,index.html,index.htm,index.js) found, and server-generated directory index forbidden by Options directive"
I updated my go.conf script to include:
PassengerStartupFile "env PORT=$PORT ./HW/HW"
Still no luck. Is it possible to do a test "Hello World" to see if it works for you guys?0 -
Our team's troubleshooting will be limited to the basic applications listed here:
https://docs.cpanel.net/cpanel/software/application-manager/#create-an-application
but I'd submit that ticket and see what we can do!
0
Please sign in to leave a comment.
Comments
3 comments