lucky bajheri Posted October 15 Share Posted October 15 How to fix this, Quote Link to comment Share on other sites More sharing options...
Dammah Sifla Posted October 15 Share Posted October 15 16 minutes ago, lucky bajheri said: How to fix this, change in file .env or menu setting WA_URL_SERVER with http:// don't use https:// Quote Link to comment Share on other sites More sharing options...
Gokay K Posted October 15 Share Posted October 15 thanks for sharing Quote Link to comment Share on other sites More sharing options...
lucky bajheri Posted October 16 Share Posted October 16 Dear pls onie timeore help me I already env file changed http, and make nod js, Server but now showing some options in admin page working site, but when i click for connect QR, not showing qr code , Quote Link to comment Share on other sites More sharing options...
Hit Solanki Posted October 16 Share Posted October 16 11 hours ago, Dammah Sifla said: Open port 3100. I checked port 3100 on your website is not open and timed out. Please tell me how to open the port Quote Link to comment Share on other sites More sharing options...
Dammah Sifla Posted October 16 Share Posted October 16 2 hours ago, lucky bajheri said: Dear pls onie timeore help me I already env file changed http, and make nod js, Server but now showing some options in admin page working site, but when i click for connect QR, not showing qr code , use node js version 18 or above Quote Link to comment Share on other sites More sharing options...
Jei Grey Posted October 16 Share Posted October 16 Whatsapp saya sering Disconnect padahal tiap 5 menit antar 5 nomor tersebut saling kirim chat dan saling jawab.. kira-kira kenapa ya? Quote Link to comment Share on other sites More sharing options...
Tasipur Salman Posted October 16 Share Posted October 16 I already env file "http" Nodis "18" Connection success But after then not now showing qr code Quote Link to comment Share on other sites More sharing options...
Tasipur Salman Posted October 16 Share Posted October 16 1 hour ago, Dammah Sifla said: use node js version 18 or above Dammah Sifla Now connection success but not now showing qr code Env "http", nodjs "18" Connection success But not showing qr Quote Link to comment Share on other sites More sharing options...
adriano Posted October 16 Share Posted October 16 with https, do I need any additional configuration?, I am not able to generate the qrcode Quote Link to comment Share on other sites More sharing options...
adhitya syahputra Posted October 16 Share Posted October 16 @adriano what panel u use ? Quote Link to comment Share on other sites More sharing options...
AOPUQI Posted October 16 Share Posted October 16 ada yang pakai di rumahweb gak kenapa ya qrnya gak mau kebuka...sudah coba node 16-20 tetep gak mau Quote Link to comment Share on other sites More sharing options...
adriano Posted October 16 Share Posted October 16 2 horas atrás, adhitya syahputra disse: @adriano what panel u use ? I use vps ubuntu Quote Link to comment Share on other sites More sharing options...
adhitya syahputra Posted October 16 Share Posted October 16 @adriano what panel u use On 10/16/2024 at 10:16 PM, adriano said: I use vps ubuntu Have you open port 3100? Quote Link to comment Share on other sites More sharing options...
adriano Posted October 16 Share Posted October 16 6 minutos atrás, adhitya syahputra disse: @adriano what panel u use Have you open port 3100? yes, then I changed it to 3200 open and the error remains Quote Link to comment Share on other sites More sharing options...
adhitya syahputra Posted October 16 Share Posted October 16 On 10/16/2024 at 10:36 PM, adriano said: yes, then I changed it to 3200 open and the error remains 1- Open the .htaccess in the root path of the script and clear all code and save it. 2-Then, we will edit the server.js file and replace this code from: /** * EXPRESS FOR ROUTING */ const express = require("express"); const app = express(); const http = require("http"); const server = http.createServer(app); To: /** * EXPRESS FOR ROUTING */ const serverOptions = { key: fs.readFileSync('key.pem'), # key.pem is your ssl key cert: fs.readFileSync('cert.pem') #cert.pem is your ssl cert } const express = require("express"); const app = express(); const https = require("https"); const server = https.createServer(serverOptions, app); 3- edit the routes/web.php file and add this code at the end of the file: URL::forceScheme('https'); 4- Open .htaccess again, put the following code inside and save: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} !^/socket.io/ RewriteCond %{REQUEST_URI} !^/backend-* RewriteCond %{REQUEST_URI} !^/public/ RewriteRule ^(.*)$ /public/$1 [L,QSA] </IfModule> <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> 5- Restart your node.js project Quote Link to comment Share on other sites More sharing options...
adriano Posted October 16 Share Posted October 16 (edited) 52 minutos atrás, adhitya syahputra disse: 1- Open the .htaccess in the root path of the script and clear all code and save it. 2-Then, we will edit the server.js file and replace this code from: /** * EXPRESS FOR ROUTING */ const express = require("express"); const app = express(); const http = require("http"); const server = http.createServer(app); To: /** * EXPRESS FOR ROUTING */ const serverOptions = { key: fs.readFileSync('key.pem'), # key.pem is your ssl key cert: fs.readFileSync('cert.pem') #cert.pem is your ssl cert } const express = require("express"); const app = express(); const https = require("https"); const server = https.createServer(serverOptions, app); 3- edit the routes/web.php file and add this code at the end of the file: URL::forceScheme('https'); 4- Open .htaccess again, put the following code inside and save: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} !^/socket.io/ RewriteCond %{REQUEST_URI} !^/backend-* RewriteCond %{REQUEST_URI} !^/public/ RewriteRule ^(.*)$ /public/$1 [L,QSA] </IfModule> <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> 5- Restart your node.js project I was unsure where to put the changes. my server.js 'use strict'; const wa = require("./server/whatsapp"); const fs = require("fs"); const dbs = require('./server/database/index'); require("dotenv").config(); const lib = require("./server/lib"); global.log = lib.log; /** * EXPRESS FOR ROUTING */ const express = require("express"); const app = express(); /** * HTTPS CONFIGURATION */ const https = require("https"); // Substitua <seu_dominio> pelo domínio que você usou para gerar os certificados com o Let's Encrypt. const privateKey = fs.readFileSync('/etc/letsencrypt/live/site/privkey.pem', 'utf8'); const certificate = fs.readFileSync('/etc/letsencrypt/live/site/cert.pem', 'utf8'); const ca = fs.readFileSync('/etc/letsencrypt/live/site/chain.pem', 'utf8'); const credentials = { key: privateKey, cert: certificate, ca: ca }; const server = https.createServer(credentials, app); /** * SOCKET.IO */ const { Server } = require("socket.io"); const io = new Server(server, { pingInterval: 25000, pingTimeout: 10000, }); // Porta definida apenas uma vez const port = process.env.PORT_NODE || 3200; // Caso PORT_NODE não esteja definido, será usada a porta 3200. app.use((req, res, next) => { res.set("Cache-Control", "no-store"); req.io = io; next(); }); const bodyParser = require("body-parser"); app.use( bodyParser.urlencoded({ extended: false, limit: "50mb", parameterLimit: 100000, }) ); app.use(bodyParser.json()); app.use(express.static("src/public")); app.use(require("./server/router")); io.on("connection", (socket) => { console.log("A user connected"); }); server.listen(port, () => { console.log(`Servidor rodando em https://localhost:${port}`); }); htaccess DirectoryIndex index.php index.html <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /mpwa/ RewriteCond %{REQUEST_URI} !^/mpwa/socket.io/ RewriteCond %{REQUEST_URI} !^/mpwa/backend-* RewriteCond %{REQUEST_URI} !^/mpwa/public/ RewriteRule ^(.*)$ /mpwa/public/$1 [L,QSA] </IfModule> <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> web.php <?php /**************************/ /* Nulled & Decoded */ /* By Magd Almuntaser */ /* TTMTT */ /**************************/ use App\Http\Controllers\Admin\ManageUsersController; use App\Http\Controllers\Admin\UpdateController; use App\Http\Controllers\Auth\LoginController; use App\Http\Controllers\Auth\LogoutController; use App\Http\Controllers\AutoreplyController; use App\Http\Controllers\TwoFactorController; use App\Http\Controllers\AibotController; use App\Http\Controllers\BlastController; use App\Http\Controllers\CampaignController; use App\Http\Controllers\ContactController; use App\Http\Controllers\FileManagerController; use App\Http\Controllers\HomeController; use App\Http\Controllers\MessagesController; use App\Http\Controllers\MessagesHistoryController; use App\Http\Controllers\RegisterController; use App\Http\Controllers\RestapiController; use App\Http\Controllers\ScanController; use App\Http\Controllers\SettingController; use App\Http\Controllers\ShowMessageController; use App\Http\Controllers\TagController; use App\Http\Controllers\UserController; use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Redirect; use Mcamara\LaravelLocalization\Facades\LaravelLocalization; use App\Http\Controllers\PasswordResetController; use App\Http\Controllers\ThemesController; require_once 'custom-route.php'; Route::group(['prefix' => LaravelLocalization::setLocale()], function() { Route::get('/', function() { return Redirect::to( '/login'); }); Route::middleware('2fa')->group(function (){ Route::get('/2fa', [TwoFactorController::class, 'showVerify'])->name('2fa.verify'); Route::post('/2fa', [TwoFactorController::class, 'verifyLogin'])->name('2fa.verify'); }); Route::middleware('auth', '2fa')->group(function (){ Route::group(['prefix' => 'laravel-filemanager'], function () { \UniSharp\LaravelFilemanager\Lfm::routes(); }); Route::get('/home',[HomeController::class,'index'])->name('home'); Route::get('/file-manager', [FileManagerController::class, 'index'])->name('file-manager'); Route::get('/filemanager', function () { return redirect('/'.LaravelLocalization::getCurrentLocale().'/laravel-filemanager'); })->name('filemanager'); Route::post('/home/setSessionSelectedDevice',[HomeController::class,'setSelectedDeviceSession'])->name('home.setSessionSelectedDevice'); Route::post('/home/sethook',[HomeController::class,'setHook'])->name('setHook'); Route::post('/home/setavailable',[HomeController::class,'setAvailable'])->name('setAvailable'); Route::post('/home/setdelay',[HomeController::class,'setDelay'])->name('setDelay'); Route::post('/home/sethookread',[HomeController::class,'setHookRead'])->name('setHookRead'); Route::post('/home/sethookreject',[HomeController::class,'setHookReject'])->name('setHookReject'); Route::post('/home/sethooktyping',[HomeController::class,'setHookTyping'])->name('setHookTyping'); Route::post('/home/setGPT',[HomeController::class,'setGPT'])->name('setGPT'); Route::post('/home',[HomeController::class,'store'])->name('addDevice'); Route::delete('/home',[HomeController::class,'destroy'])->name('deleteDevice'); Route::get('/scan/{number:body}',[ScanController::class,'scan'])->name('scan'); Route::get('/code/{number:body}',[ScanController::class,'code'])->name('connect-via-code'); Route::get('/autoreply',[AutoreplyController::class,'index'])->name('autoreply'); Route::post('/autoreply',[AutoreplyController::class,'store'])->name('autoreply'); Route::get('/autoreply-edit/{id}', [AutoreplyController::class, 'edit'])->name('autoreply.edit'); Route::post('/autoreply-edit', [AutoreplyController::class, 'editUpdate'])->name('autoreply.edit.update'); Route::delete('/autoreply',[AutoreplyController::class,'destroy'])->name('autoreply.delete'); Route::post('auto-reply/update/{autoreply:id}',[AutoreplyController::class,'update'])->name('autoreply.update'); Route::get('/aibot',[AibotController::class,'index'])->name('aibot'); Route::post('/aibot',[AibotController::class,'store'])->name('aibot'); Route::get('/phonebook',[TagController::class,'index'])->name('phonebook'); Route::get('/get-phonebook',[TagController::class,'getPhonebook'])->name('getPhonebook'); Route::delete('/clear-phonebook',[TagController::class,'clearPhonebook'])->name('clearPhonebook'); Route::get('get-contact/{id}',[ContactController::class,'getContactByTagId']); Route::post('/contact/store',[ContactController::class,'store'])->name('contact.store'); Route::delete('/contact/delete/{contact:id}',[ContactController::class,'destroy'])->name('contact.delete'); Route::delete('/contact/delete-all/{id}',[ContactController::class,'DestroyAll'])->name('deleteAll'); Route::post('/contact/import',[ContactController::class,'import'])->name('import'); Route::get('/contact/export/{id}',[ContactController::class,'export'])->name('exportContact'); Route::post('/tags',[TagController::class,'store'])->name('tag.store'); Route::delete('/tags',[TagController::class,'destroy'])->name('tag.delete'); Route::post('fetch-groups',[TagController::class ,'fetchGroups'])->name('fetch.groups'); Route::get('/campaigns',[CampaignController::class,'index'])->name('campaigns'); Route::get('/campaign/create',[CampaignController::class,'create'])->name('campaign.create'); Route::post('/campaign/store',[CampaignController::class,'store'])->name('campaign.store'); Route::post('/campaign/pause/{id}',[CampaignController::class,'pause'])->name('campaign.pause'); Route::post('/campaign/resume/{id}',[CampaignController::class,'resume'])->name('campaign.resume'); Route::delete('/campaign/delete/{id}',[CampaignController::class,'destroy'])->name('campaign.delete'); Route::get('/campaign/show/{id}',[CampaignController::class,'show'])->name('campaign.show'); Route::delete('/campaign/clear',[CampaignController::class,'destroyAll'])->name('campaigns.delete.all'); Route::get('/campaign/blast/{campaign:id}',[BlastController::class,'index'])->name('campaign.blasts'); Route::post('/preview-message',[ShowMessageController::class,'index'])->name('previewMessage'); Route::get('/form-message/{type}',[ShowMessageController::class,'getFormByType'])->name('formMessage'); Route::get('/form-message-edit/{type}',[ShowMessageController::class,'showEdit'])->name('formMessageEdit'); Route::get('/message/test',[MessagesController::class,'index'])->name('messagetest'); Route::post('/message/test',[MessagesController::class,'store'])->name('messagetest'); Route::get('/api-docs',RestapiController::class)->name('rest-api'); Route::get('/user/settings',[UserController::class,'settings'])->name('user.settings'); Route::post('/user/change-password',[UserController::class,'changePasswordPost'])->name('changePassword'); Route::post('/user/setting/apikey',[UserController::class,'generateNewApiKey'])->name('generateNewApiKey'); Route::post('/user/setting/deletehistory',[UserController::class,'deleteHistory'])->name('deleteHistory'); Route::post('/user/settings/2fa', [UserController::class, 'toggleTwoFactor'])->name('user.settings.2fa'); Route::get('/user/2fa_setup', [TwoFactorController::class, 'showSetup'])->name('user.2fa_setup'); Route::post('/user/2fa/verify', [TwoFactorController::class, 'verify'])->name('user.2fa.verify'); Route::get('/admin/settings',[SettingController::class,'index'])->name('admin.settings'); Route::post('/settings/server',[SettingController::class,'setServer'])->name('setServer'); Route::post('/settings/generate-ssl', [SettingController::class, 'generateSslCertificate'])->name('generateSsl'); Route::post('/settings/setenvall', [SettingController::class, 'setEnvAll'])->name('setEnvAll'); Route::get('/admin/update',[UpdateController::class,'checkUpdate'])->name('update'); Route::post('/admin/update/install',[UpdateController::class,'installUpdate'])->name('update.install'); Route::get('/admin/manage-themes',[ThemesController::class,'index'])->name('admin.manage-themes'); Route::get('/admin/active-themes/{name}',[ThemesController::class,'activeTheme'])->name('themes.active'); Route::post('/admin/download-themes',[ThemesController::class,'downloadTheme'])->name('themes.download'); Route::post('/admin/delete-themes',[ThemesController::class,'deleteTheme'])->name('themes.delete'); Route::get('/admin/manage-users',[ManageUsersController::class,'index'])->name('admin.manage-users')->middleware('admin'); Route::post('/admin/user/store',[ManageUsersController::class,'store'])->name('user.store')->middleware('admin'); Route::delete('/admin/user/delete/{id}',[ManageUsersController::class,'delete'])->name('user.delete')->middleware('admin'); Route::get('admin/user/edit',[ManageUsersController::class,'edit'])->name('user.edit')->middleware('admin'); Route::post('admin/user/update',[ManageUsersController::class,'update'])->name('user.update')->middleware('admin'); Route::get('/messages-history',[MessagesHistoryController::class,'index'])->name('messages.history'); Route::post('/resend-message',[MessagesHistoryController::class,'resend'])->name('resend.message'); Route::post('/delete-messages',[MessagesHistoryController::class,'deleteAll'])->name('delete.messages'); }); Route::middleware('guest')->group(function(){ Route::get('/login',[LoginController::class,'index'])->name('login'); Route::get('/register',[RegisterController::class,'index'])->name('register'); Route::post('/register',[RegisterController::class,'store'])->name('register'); Route::post('/login',[LoginController::class,'store'])->name('login')->middleware('throttle:5,1'); Route::get('password/reset', [PasswordResetController::class, 'showLinkRequestForm'])->name('password.request'); Route::post('password/email', [PasswordResetController::class, 'sendResetLinkEmail'])->name('password.email'); Route::get('password/reset/{token}', [PasswordResetController::class, 'showResetForm'])->name('password.reset'); Route::post('password/reset', [PasswordResetController::class, 'reset'])->name('password.update'); }); Route::match(['get', 'post'], '/logout', LogoutController::class)->name('logout'); Route::get('/install', [SettingController::class,'install'])->name('setting.install_app'); Route::post('/install', [SettingController::class,'install'])->name('settings.install_app'); Route::post('/settings/check_database_connection',[SettingController::class,'test_database_connection'])->name('connectDB'); Route::post('/settings/activate_license',[SettingController::class,'activate_license'])->name('activateLicense'); }); URL::forceScheme('https'); ?> Edited October 16 by adriano Quote Link to comment Share on other sites More sharing options...
adhitya syahputra Posted October 16 Share Posted October 16 On 10/16/2024 at 11:40 PM, adriano said: I was unsure where to put the changes. my server.js 'use strict'; const wa = require("./server/whatsapp"); const fs = require("fs"); const dbs = require('./server/database/index'); require("dotenv").config(); const lib = require("./server/lib"); global.log = lib.log; /** * EXPRESS FOR ROUTING */ const express = require("express"); const app = express(); /** * HTTPS CONFIGURATION */ const https = require("https"); // Substitua <seu_dominio> pelo domínio que você usou para gerar os certificados com o Let's Encrypt. const privateKey = fs.readFileSync('/etc/letsencrypt/live/site/privkey.pem', 'utf8'); const certificate = fs.readFileSync('/etc/letsencrypt/live/site/cert.pem', 'utf8'); const ca = fs.readFileSync('/etc/letsencrypt/live/site/chain.pem', 'utf8'); const credentials = { key: privateKey, cert: certificate, ca: ca }; const server = https.createServer(credentials, app); /** * SOCKET.IO */ const { Server } = require("socket.io"); const io = new Server(server, { pingInterval: 25000, pingTimeout: 10000, }); // Porta definida apenas uma vez const port = process.env.PORT_NODE || 3200; // Caso PORT_NODE não esteja definido, será usada a porta 3200. app.use((req, res, next) => { res.set("Cache-Control", "no-store"); req.io = io; next(); }); const bodyParser = require("body-parser"); app.use( bodyParser.urlencoded({ extended: false, limit: "50mb", parameterLimit: 100000, }) ); app.use(bodyParser.json()); app.use(express.static("src/public")); app.use(require("./server/router")); io.on("connection", (socket) => { console.log("A user connected"); }); server.listen(port, () => { console.log(`Servidor rodando em https://localhost:${port}`); }); htaccess DirectoryIndex index.php index.html <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /mpwa/ RewriteCond %{REQUEST_URI} !^/mpwa/socket.io/ RewriteCond %{REQUEST_URI} !^/mpwa/backend-* RewriteCond %{REQUEST_URI} !^/mpwa/public/ RewriteRule ^(.*)$ /mpwa/public/$1 [L,QSA] </IfModule> <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> web.php <?php /**************************/ /* Nulled & Decoded */ /* By Magd Almuntaser */ /* TTMTT */ /**************************/ use App\Http\Controllers\Admin\ManageUsersController; use App\Http\Controllers\Admin\UpdateController; use App\Http\Controllers\Auth\LoginController; use App\Http\Controllers\Auth\LogoutController; use App\Http\Controllers\AutoreplyController; use App\Http\Controllers\TwoFactorController; use App\Http\Controllers\AibotController; use App\Http\Controllers\BlastController; use App\Http\Controllers\CampaignController; use App\Http\Controllers\ContactController; use App\Http\Controllers\FileManagerController; use App\Http\Controllers\HomeController; use App\Http\Controllers\MessagesController; use App\Http\Controllers\MessagesHistoryController; use App\Http\Controllers\RegisterController; use App\Http\Controllers\RestapiController; use App\Http\Controllers\ScanController; use App\Http\Controllers\SettingController; use App\Http\Controllers\ShowMessageController; use App\Http\Controllers\TagController; use App\Http\Controllers\UserController; use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Redirect; use Mcamara\LaravelLocalization\Facades\LaravelLocalization; use App\Http\Controllers\PasswordResetController; use App\Http\Controllers\ThemesController; require_once 'custom-route.php'; Route::group(['prefix' => LaravelLocalization::setLocale()], function() { Route::get('/', function() { return Redirect::to( '/login'); }); Route::middleware('2fa')->group(function (){ Route::get('/2fa', [TwoFactorController::class, 'showVerify'])->name('2fa.verify'); Route::post('/2fa', [TwoFactorController::class, 'verifyLogin'])->name('2fa.verify'); }); Route::middleware('auth', '2fa')->group(function (){ Route::group(['prefix' => 'laravel-filemanager'], function () { \UniSharp\LaravelFilemanager\Lfm::routes(); }); Route::get('/home',[HomeController::class,'index'])->name('home'); Route::get('/file-manager', [FileManagerController::class, 'index'])->name('file-manager'); Route::get('/filemanager', function () { return redirect('/'.LaravelLocalization::getCurrentLocale().'/laravel-filemanager'); })->name('filemanager'); Route::post('/home/setSessionSelectedDevice',[HomeController::class,'setSelectedDeviceSession'])->name('home.setSessionSelectedDevice'); Route::post('/home/sethook',[HomeController::class,'setHook'])->name('setHook'); Route::post('/home/setavailable',[HomeController::class,'setAvailable'])->name('setAvailable'); Route::post('/home/setdelay',[HomeController::class,'setDelay'])->name('setDelay'); Route::post('/home/sethookread',[HomeController::class,'setHookRead'])->name('setHookRead'); Route::post('/home/sethookreject',[HomeController::class,'setHookReject'])->name('setHookReject'); Route::post('/home/sethooktyping',[HomeController::class,'setHookTyping'])->name('setHookTyping'); Route::post('/home/setGPT',[HomeController::class,'setGPT'])->name('setGPT'); Route::post('/home',[HomeController::class,'store'])->name('addDevice'); Route::delete('/home',[HomeController::class,'destroy'])->name('deleteDevice'); Route::get('/scan/{number:body}',[ScanController::class,'scan'])->name('scan'); Route::get('/code/{number:body}',[ScanController::class,'code'])->name('connect-via-code'); Route::get('/autoreply',[AutoreplyController::class,'index'])->name('autoreply'); Route::post('/autoreply',[AutoreplyController::class,'store'])->name('autoreply'); Route::get('/autoreply-edit/{id}', [AutoreplyController::class, 'edit'])->name('autoreply.edit'); Route::post('/autoreply-edit', [AutoreplyController::class, 'editUpdate'])->name('autoreply.edit.update'); Route::delete('/autoreply',[AutoreplyController::class,'destroy'])->name('autoreply.delete'); Route::post('auto-reply/update/{autoreply:id}',[AutoreplyController::class,'update'])->name('autoreply.update'); Route::get('/aibot',[AibotController::class,'index'])->name('aibot'); Route::post('/aibot',[AibotController::class,'store'])->name('aibot'); Route::get('/phonebook',[TagController::class,'index'])->name('phonebook'); Route::get('/get-phonebook',[TagController::class,'getPhonebook'])->name('getPhonebook'); Route::delete('/clear-phonebook',[TagController::class,'clearPhonebook'])->name('clearPhonebook'); Route::get('get-contact/{id}',[ContactController::class,'getContactByTagId']); Route::post('/contact/store',[ContactController::class,'store'])->name('contact.store'); Route::delete('/contact/delete/{contact:id}',[ContactController::class,'destroy'])->name('contact.delete'); Route::delete('/contact/delete-all/{id}',[ContactController::class,'DestroyAll'])->name('deleteAll'); Route::post('/contact/import',[ContactController::class,'import'])->name('import'); Route::get('/contact/export/{id}',[ContactController::class,'export'])->name('exportContact'); Route::post('/tags',[TagController::class,'store'])->name('tag.store'); Route::delete('/tags',[TagController::class,'destroy'])->name('tag.delete'); Route::post('fetch-groups',[TagController::class ,'fetchGroups'])->name('fetch.groups'); Route::get('/campaigns',[CampaignController::class,'index'])->name('campaigns'); Route::get('/campaign/create',[CampaignController::class,'create'])->name('campaign.create'); Route::post('/campaign/store',[CampaignController::class,'store'])->name('campaign.store'); Route::post('/campaign/pause/{id}',[CampaignController::class,'pause'])->name('campaign.pause'); Route::post('/campaign/resume/{id}',[CampaignController::class,'resume'])->name('campaign.resume'); Route::delete('/campaign/delete/{id}',[CampaignController::class,'destroy'])->name('campaign.delete'); Route::get('/campaign/show/{id}',[CampaignController::class,'show'])->name('campaign.show'); Route::delete('/campaign/clear',[CampaignController::class,'destroyAll'])->name('campaigns.delete.all'); Route::get('/campaign/blast/{campaign:id}',[BlastController::class,'index'])->name('campaign.blasts'); Route::post('/preview-message',[ShowMessageController::class,'index'])->name('previewMessage'); Route::get('/form-message/{type}',[ShowMessageController::class,'getFormByType'])->name('formMessage'); Route::get('/form-message-edit/{type}',[ShowMessageController::class,'showEdit'])->name('formMessageEdit'); Route::get('/message/test',[MessagesController::class,'index'])->name('messagetest'); Route::post('/message/test',[MessagesController::class,'store'])->name('messagetest'); Route::get('/api-docs',RestapiController::class)->name('rest-api'); Route::get('/user/settings',[UserController::class,'settings'])->name('user.settings'); Route::post('/user/change-password',[UserController::class,'changePasswordPost'])->name('changePassword'); Route::post('/user/setting/apikey',[UserController::class,'generateNewApiKey'])->name('generateNewApiKey'); Route::post('/user/setting/deletehistory',[UserController::class,'deleteHistory'])->name('deleteHistory'); Route::post('/user/settings/2fa', [UserController::class, 'toggleTwoFactor'])->name('user.settings.2fa'); Route::get('/user/2fa_setup', [TwoFactorController::class, 'showSetup'])->name('user.2fa_setup'); Route::post('/user/2fa/verify', [TwoFactorController::class, 'verify'])->name('user.2fa.verify'); Route::get('/admin/settings',[SettingController::class,'index'])->name('admin.settings'); Route::post('/settings/server',[SettingController::class,'setServer'])->name('setServer'); Route::post('/settings/generate-ssl', [SettingController::class, 'generateSslCertificate'])->name('generateSsl'); Route::post('/settings/setenvall', [SettingController::class, 'setEnvAll'])->name('setEnvAll'); Route::get('/admin/update',[UpdateController::class,'checkUpdate'])->name('update'); Route::post('/admin/update/install',[UpdateController::class,'installUpdate'])->name('update.install'); Route::get('/admin/manage-themes',[ThemesController::class,'index'])->name('admin.manage-themes'); Route::get('/admin/active-themes/{name}',[ThemesController::class,'activeTheme'])->name('themes.active'); Route::post('/admin/download-themes',[ThemesController::class,'downloadTheme'])->name('themes.download'); Route::post('/admin/delete-themes',[ThemesController::class,'deleteTheme'])->name('themes.delete'); Route::get('/admin/manage-users',[ManageUsersController::class,'index'])->name('admin.manage-users')->middleware('admin'); Route::post('/admin/user/store',[ManageUsersController::class,'store'])->name('user.store')->middleware('admin'); Route::delete('/admin/user/delete/{id}',[ManageUsersController::class,'delete'])->name('user.delete')->middleware('admin'); Route::get('admin/user/edit',[ManageUsersController::class,'edit'])->name('user.edit')->middleware('admin'); Route::post('admin/user/update',[ManageUsersController::class,'update'])->name('user.update')->middleware('admin'); Route::get('/messages-history',[MessagesHistoryController::class,'index'])->name('messages.history'); Route::post('/resend-message',[MessagesHistoryController::class,'resend'])->name('resend.message'); Route::post('/delete-messages',[MessagesHistoryController::class,'deleteAll'])->name('delete.messages'); }); Route::middleware('guest')->group(function(){ Route::get('/login',[LoginController::class,'index'])->name('login'); Route::get('/register',[RegisterController::class,'index'])->name('register'); Route::post('/register',[RegisterController::class,'store'])->name('register'); Route::post('/login',[LoginController::class,'store'])->name('login')->middleware('throttle:5,1'); Route::get('password/reset', [PasswordResetController::class, 'showLinkRequestForm'])->name('password.request'); Route::post('password/email', [PasswordResetController::class, 'sendResetLinkEmail'])->name('password.email'); Route::get('password/reset/{token}', [PasswordResetController::class, 'showResetForm'])->name('password.reset'); Route::post('password/reset', [PasswordResetController::class, 'reset'])->name('password.update'); }); Route::match(['get', 'post'], '/logout', LogoutController::class)->name('logout'); Route::get('/install', [SettingController::class,'install'])->name('setting.install_app'); Route::post('/install', [SettingController::class,'install'])->name('settings.install_app'); Route::post('/settings/check_database_connection',[SettingController::class,'test_database_connection'])->name('connectDB'); Route::post('/settings/activate_license',[SettingController::class,'activate_license'])->name('activateLicense'); }); URL::forceScheme('https'); ?> its my server.js /** * EXPRESS FOR ROUTING */ const serverOptions = { key: fs.readFileSync('/home/cert/total/privkey.pem'), cert: fs.readFileSync('/home/cert/total/cert.csr') } const express = require("express"); const app = express(); const https = require("https"); const server = https.createServer(serverOptions, app); /** it's my web.php Route::post('/settings/check_database_connection',[SettingController::class,'test_database_connection'])->name('connectDB'); Route::post('/settings/activate_license',[SettingController::class,'activate_license'])->name('activateLicense'); URL::forceScheme('https'); }); ?> Quote Link to comment Share on other sites More sharing options...
Tasipur Salman Posted October 16 Share Posted October 16 16 minutes ago, adhitya syahputra said: its my server.js /** * EXPRESS FOR ROUTING */ const serverOptions = { key: fs.readFileSync('/home/cert/total/privkey.pem'), cert: fs.readFileSync('/home/cert/total/cert.csr') } const express = require("express"); const app = express(); const https = require("https"); const server = https.createServer(serverOptions, app); /** it's my web.php Route::post('/settings/check_database_connection',[SettingController::class,'test_database_connection'])->name('connectDB'); Route::post('/settings/activate_license',[SettingController::class,'activate_license'])->name('activateLicense'); URL::forceScheme('https'); }); ?> Brother why not showing QR Code, when my sever is connected success Please help Quote Link to comment Share on other sites More sharing options...
Tasipur Salman Posted October 16 Share Posted October 16 48 minutes ago, adhitya syahputra said: its my server.js /** * EXPRESS FOR ROUTING */ const serverOptions = { key: fs.readFileSync('/home/cert/total/privkey.pem'), cert: fs.readFileSync('/home/cert/total/cert.csr') } const express = require("express"); const app = express(); const https = require("https"); const server = https.createServer(serverOptions, app); /** it's my web.php Route::post('/settings/check_database_connection',[SettingController::class,'test_database_connection'])->name('connectDB'); Route::post('/settings/activate_license',[SettingController::class,'activate_license'])->name('activateLicense'); URL::forceScheme('https'); }); ?> Brother why not showing QR Code, when my sever is connected success Please help What is the issue when install nodjs Quote Link to comment Share on other sites More sharing options...
AOPUQI Posted October 17 Share Posted October 17 @Jei Grey pakai hosting mana kak Quote Link to comment Share on other sites More sharing options...
Jei Grey Posted October 17 Share Posted October 17 6 minutes ago, AOPUQI said: @Jei Grey pakai hosting mana kak niagahoster Quote Link to comment Share on other sites More sharing options...
adhiete Posted October 17 Share Posted October 17 17 hours ago, adriano said: with https, do I need any additional configuration?, I am not able to generate the qrcode @adriano try check the status of the port. is it running or not. Then change .env on your web root folder to this, APP_URL=https://yourwebsite WA_URL_SERVER=https://yourwebsite:portnodejs then save. restart the apache2. then change to your web folder cd /var/www/html/yourmpwafolder then execute node server.js I'm on debian12 with node20 CMIIW Quote Link to comment Share on other sites More sharing options...
adriano Posted October 17 Share Posted October 17 8 horas atrás, adhiete disse: @adriano try check the status of the port. is it running or not. Then change .env on your web root folder to this, APP_URL=https://yourwebsite WA_URL_SERVER=https://yourwebsite:portnodejs then save. restart the apache2. then change to your web folder cd /var/www/html/yourmpwafolder then execute node server.js I'm on debian12 with node20 CMIIW Hi, it's already like this in my .env, it ran normally on http, when I changed it to https it doesn't show the qrcode i use ubuntu e node 22 Quote Link to comment Share on other sites More sharing options...
adhiete Posted October 17 Share Posted October 17 (edited) 19 hours ago, adriano said: const port = process.env.PORT_NODE || 3200; // Caso PORT_NODE não esteja definido, será usada a porta 3200. @adriano try change to this one const port = process.env.PORT_NODE; stop the server.js and run again. if the QR code still not running, try change this 19 hours ago, adriano said: /** * EXPRESS FOR ROUTING */ const express = require("express"); const app = express(); /** * HTTPS CONFIGURATION */ const https = require("https"); // Substitua <seu_dominio> pelo domínio que você usou para gerar os certificados com o Let's Encrypt. const privateKey = fs.readFileSync('/etc/letsencrypt/live/site/privkey.pem', 'utf8'); const certificate = fs.readFileSync('/etc/letsencrypt/live/site/cert.pem', 'utf8'); const ca = fs.readFileSync('/etc/letsencrypt/live/site/chain.pem', 'utf8'); const credentials = { key: privateKey, cert: certificate, ca: ca }; const server = https.createServer(credentials, app); to this one, /** * EXPRESS FOR ROUTING */ const express = require("express"); const app = express(); const https = require("https"); const server = https.createServer({ "key": fs.readFileSync("/etc/letsencrypt/live/yoursite/privkey.pem"), "cert": fs.readFileSync("/etc/letsencrypt/live/yoursite/fullchain.pem"), }, app); Edited October 17 by adhiete Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.