#help

1 messages · Page 1 of 1 (latest)

safe sundial
#

Target class [CustomController] does not exist.

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class CustomController extends Controller
{
public function proxy()
{
// Define the path to your HTML file
$filePath = '/var/www/reversed/index.html';

    // Check if the file exists
    if (file_exists($filePath)) {
        // Read the contents of the HTML file
        $htmlContent = file_get_contents($filePath);

        // Return the HTML content as a response
        return response($htmlContent, 200)
            ->header('Content-Type', 'text/html');
    } else {
        return response()->json(['error' => 'HTML file not found'], 404);
    }
}

}

Route::get('/proxy', 'CustomController@customMethod');

safe sundial
#

named /proxy which will like make the website use a html file which i might just make it use a php file instead

lament hound
#

you don't need to create a class if you only want one function to be used in route file

#

wait

safe sundial
#

oh

#

i dont really know Ctrlpanel so yeah

lament hound
#

Route::get('/proxy', function (Request $request) {
// ...
});

safe sundial
#

how do i make it show a html file?

lament hound
safe sundial
#

ok

lament hound
safe sundial
#

alr

lament hound
#
Route::get('/proxy', function (Request $request) {
    // Define the path to your HTML file
    $filePath = '/var/www/reversed/index.html';

    // Check if the file exists
    if (file_exists($filePath)) {
        // Read the contents of the HTML file
        $htmlContent = file_get_contents($filePath);

        // Return the HTML content as a response
        return response($htmlContent, 200)
            ->header('Content-Type', 'text/html');
    } else {
        return response()->json(['error' => 'HTML file not found'], 404);
    }
}); 
#

@safe sundial

safe sundial
#

thx man

lament hound
#

you're welcome

safe sundial
#

aye it works

lament hound
#

👍

safe sundial
#

thank u so much man

lament hound
#

np

safe sundial
#

how do i?

Cause i dont like doing it manually plus its cool asf

lament hound
#

idk what proxy pass mean

safe sundial
#

a reversed proxy

#

what pterodactyl has

lament hound
#

pterodactyl does not have a reverse proxy afaik..?

safe sundial
#

yes it does

#

since it uses nginx

#

but u gotta set it up manually

lament hound
#

nah, nginx is the reverse proxy, which serves the php and other files of pterodactyl

safe sundial
#

ah

lament hound
safe sundial
#

how did they do theirs ik they use a template

lament hound
#

or you can ask someone to do it for you -> #1065571565644812298

lament hound
safe sundial
#

alr thanks man

lament hound
#

probably something to do with nginx proxy manager or something

safe sundial
#

oh yeah

#

@lament hound i need help with something else

rancid frigateBOT
safe sundial
#

dang relax sorry

#

the dash keeps getting ddosed and some reason our ddos protection cannot do anything and idk if its due to the nginx setup cause other websites with us beside reversed proxy aka hosted with nginx where the ddos protection has full security the 750GBPS works fine but the dash and panel doesn't and idk how to fix that without cloudflare

lament hound