How to Host on Cloudpanel, I installed but site is broken

I am New to FarmOS , I am Using Vultr VPS currently i run my all sites and projects through Cloudpanel.so how i want to install farmOS on Cloudpanel ,it has drupal and all opensource software supports and plug and play opration,so i didnt find tutorial regarding this how to install on cloudpanel.

P.S- I Installed using packaged release tar file, i inserted that to in my webroot , then i go to my site/web folder installation done , but site is broken and when i click to any menu 404 not found error showing looks like nginx issue because htaccess file not support cloudpanel using nginx

below is my vhost file of nginx,help me to figureout

server {
  listen 80;
  listen [::]:80;
  listen 443 quic;
  listen 443 ssl;
  listen [::]:443 quic;
  listen [::]:443 ssl;
  http2 on;
  http3 off;
  {{ssl_certificate_key}}
  {{ssl_certificate}}
  server_name myfarm.gropiktech.in;
  {{root}}

  {{nginx_access_log}}
  {{nginx_error_log}}

  if ($scheme != "https") {
    rewrite ^ https://$host$request_uri permanent;
  }

  location ~ /.well-known {
    auth_basic off;
    allow all;
  }

  {{settings}}

  location / {
    {{varnish_proxy_pass}}
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_hide_header X-Varnish;
    proxy_redirect off;
    proxy_max_temp_file_size 0;
    proxy_connect_timeout      720;
    proxy_send_timeout         720;
    proxy_read_timeout         720;
    proxy_buffer_size          128k;
    proxy_buffers              4 256k;
    proxy_busy_buffers_size    256k;
    proxy_temp_file_write_size 256k;
  }

  location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map|mjs)$ {
    add_header Access-Control-Allow-Origin "*";
    add_header alt-svc 'h3=":443"; ma=86400';
    expires max;
    access_log off;
  }

  location ~ /\.(ht|svn|git) {
    deny all;
  }

  if (-f $request_filename) {
    break;
  }
}

server {
  listen 8080;
  listen [::]:8080;
  server_name myfarm.gropiktech.in;
  {{root}}

  include /etc/nginx/global_settings;

  try_files $uri $uri/ /index.php?$args;
  index index.php index.html;

  location ~ \.php$ {
    include fastcgi_params;
    fastcgi_intercept_errors on;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    try_files $uri =404;
    fastcgi_read_timeout 3600;
    fastcgi_send_timeout 3600;
    fastcgi_param HTTPS "on";
    fastcgi_param SERVER_PORT 443;
    fastcgi_pass 127.0.0.1:{{php_fpm_port}};
    fastcgi_param PHP_VALUE "{{php_settings}}";
  }

  if (-f $request_filename) {
    break;
  }
}
1 Like

Welcome to the forum @vbxlive!

I don’t have any experience with CloudPanel, but I did a quick search for “Drupal CloudPanel” (because farmOS is a distribution of Drupal) and found this:

Skip to the “Creating a Drupal Project” section, and there are instructions for creating a project via composer create-project, which is essentially the same approach that we describe here:

In the CloudPanel docs, it says to run this command (which installs Drupal 11 - not farmOS):

php8.3 /usr/local/bin/composer create-project drupal/recommended-project:^11 -n www.domain.com

But you would change that to this instead (which installs farmOS):

php8.3 /usr/local/bin/composer create-project farmos/project:3.x-dev -n www.domain.com

Please read through all the documentation on Building farmOS with Com to understand how everything works, and there are some additional steps in there that you will need to do.

Hope that helps!

i installed successfully but site is broken issue with rewrite accesss or need additional config for rewrite nginx i dont understand

Also, since your are self-hosting, be sure to read through and understand how to update your farmOS instance when new versions are released!

And specifically for Composer-based installs:

And most important of all: set yourself up with a backup procedure! You need to back up three things:

  1. Database
  2. Uploaded files (the web/sites/default directory)
  3. The codebase (or use Git to maintain your code so it’s easy to restore)
1 Like

here is screenshot of error


Reinstalled but same issue, install correctly but only frontpage comes broken and shows 404 not found when we click on any menu

I think this is virtual host condition problem in nginx config file.

yes ,how to fix this looks like mod rewrite issue

Could you check fastcgi is running or not?