Jump to content

ujcis

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by ujcis

  1. Thanks for your help. For now, I'll temporarily go with flask (I'll try PHP again when everything's normal). Can you kindly enable wsgi control for me? I followed the python set up instruction and have /cgi-bin/test.py running successfully, however, my flask app located in the main directory (wegocarryfirst.helioho.st) is showing "Internal Server Error". I once had a python app here with error logs. I'm not sure if I enabled the error logs myself or by the help of a moderator. The app runs without issues on my localhost. In summary, I need wsgi control and error_logs. Thanks again!
  2. Thanks! I've decided to use PHP, however I ran into an issue. I'm not sure where to place my htaccess file. I placed it in the new wegocarryfirst.helioho.st folder's root and it's content is: # .htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] I'm trying to route everything to index.php but I'm getting 502 Bad Gateway (nginx) or "Not Found". I'll appreciate any help. Thanks again.
  3. Hi! I'd like an additional domain (if I can get one) with the url wegocarryfirst.helioho.st. I intend to run a flask app on it, and I'll be needing wsgi control as well. My username is ujcis. Thank you!
  4. I'm running a Fastify application on Johnny and have structured my project to keep routes separate for maintainability. Instead of defining all routes in app.js, I have a routes/ folder where each route is stored in its own file. For example, I have routes/apps.js, which looks like this: const knexConfig = require('../knexfile'); const knex = require('knex')(knexConfig.production); const authMiddleware = require('../middlewares/auth'); async function appRoutes(fastify, opts) { fastify.post('/addapps', { preHandler: authMiddleware }, async (request, reply) => { ... } module.exports = appRoutes; In the main app.js, I have this: const fastify = require('fastify')({ logger: true }); async function main() { try { await fastify.register(require('./routes/apps')); fastify.get('/', async (req, reply) => { return { message: 'Ok!' }; }); await fastify.listen({ port: 3000, host: '127.0.0.1' }); } catch (err) { fastify.log.error(err); process.exit(1); } } main(); The issue is that while the / route in app.js works just fine, any additional routes I place in routes/ do not work unless I manually define them inside app.js. I get the "not found" error. { "message": "Route GET:/addapps not found", "error": "Not Found", "statusCode": 404 } This defeats the purpose of splitting routes into separate files for maintainability. Is there a limitation on Johnny preventing Fastify from loading external routes properly or is it a config issue on my path? How can I ensure all routes inside routes/ are correctly recognized when using fastify.register()? I've attached a screenshot of my config. Thanks!
  5. I think I have an app running on one of my domains, but I get the error (see title of this post). I'm not sure what's causing this. The image attached is my current configuration. I have my app.js in the document root, and 2 folders (routes and middlewares). I also have my package.json in this folder. I turned on dev mode thinking I'll get more details, but same. I'll appreciate any help, thank you!
  6. Oh, for some silly reason I thought getting flask to work required getting Python CGI to work first. My intention is to get Flask running on the new domain. I've deleted the test.py from cgi-bin folder leaving flask.wsgi, .htaccess, and myapp.py in the root. But flask still doesn't work. Also I've noticed a new folder in my log folder corresponding to my new domain, however it's empty even though I'm getting an Internal Server error.
  7. Thanks, but I still have some challenges. I'm not really sure how python/flask works on additional domains. My new alutagram.helioho.st folder contains a cgi-bin folder and an index.html file. Things I've tried to get Flask running: 1. I've tried making the required files from the tutorial: https://wiki.helionet.org/tutorials/flask 2. I followed the tutorial on https://wiki.helionet.org/tutorials/python and made the test.py executable file in the new cgi-bin folder. Result: Flask wasn't running so I made a .htaccess file with the following content in the alutagram.helioho.st folder: ` Options +ExecCGI RewriteEngine On RewriteBase / RewriteRule ^(media/.*)$ - [L] RewriteRule ^(admin_media/.*)$ - [L] RewriteRule ^(flask\.wsgi/.*)$ - [L] RewriteRule ^(.*)$ flask.wsgi/$1 [QSA,PT,L] ` The HTACCESS file causes an Internal Server Error, but nothing shows in my error_log
  8. Hi. I'd like to request WSGI control for my newly added domain alutagram.helioho.st. Thanks!
  9. Yes please. Thank you! alutagram.heliohost.org or helioho.st
  10. Oh, I don't intend to delete the first project. It's active and running. I only hoped there was a way to either get the error_log to record logs from both projects, or at least record logs only the new project if it can't handle from both. While I no longer need the logs from httpdocs/ujcis, I still need the project running.
  11. While building my first Flask project, I noticed my error_log displayed errors almost in real time after requesting WSGI control. However, my newer project located in ujcis.helioho.st/aluta doesn't show errors from the /aluta project at all. Do I need to request WSGI control specifically for the new project (httpdocs/aluta) for errors originating from the project to reflect in the log/error_log file? P.S: I don't mind if errors are turned off for the first project (ujcis) since I'm no longer actively developing that project. Thanks!
  12. Hmm... It's weird because I'm not trying to access any folder called "instance" in my code. My codebase is very small and I've crosschecked to ensure that I'm not doing that. Also, I tried just creating the folder called "instance" and even created an additional "instance" flask route just to see if it'll mitigate the error, but nothing. And my logs/error_log still doesn't display any errors from this project...it only does from my first httpdocs/ujcis flask project. Thanks for your help!
  13. Thanks! But one more thing... I've been using the modified /home/ujcis.helioho.st/httpdocs/ujcis/flask.wsgi to see newest changes on the /home/ujcis.helioho.st/httpdocs/ujcis/ project. However, I yesterday morning, added a newer project to the httpdocs project called "aluta...". Since then I've been on an unclear error with code 500 (unclear since it doesn't show up in my error_log, and modifying the new project's flask.wsgi doesn't refresh the project either. I thought I misunderstood the instructions and went ahead to modify the older project's flask.wsgi instead, but nothing happens either. I need a little help with this. Thank you!
  14. Hi there. I just set up my flask app, but I'd like wsgi control since I'm in active development. username=ujcis, server name=ujcis.helioho.st (Johnny), and the domain name=ujcis.helioho.st/cis. Thank you!
  15. I'm on python 3.12 based on my setup from the link you shared. Also I went throuht the rules earlier. Thanks!
  16. Hi there. I just started trying out Johnny / HelioHost yesterday. I'd like to request the python module PyPDF2 to be added to my account ujcis.helioho.st. Thank you.
×
×
  • Create New...