Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs on running second site on same domain #70

Open
digininja opened this issue Jun 19, 2018 · 6 comments
Open

Docs on running second site on same domain #70

digininja opened this issue Jun 19, 2018 · 6 comments

Comments

@digininja
Copy link

I might have set things up wrong to get in this position but I set the app up on targetdomain.com and now need to host some files on the domain so that I can direct the users to them.

I've moved the app out of the way and have now had to edit the laravel routes file to allow me to host some files in the root of the domain.

As an example I've added

Route::get('/amazon', function () {
    return 'Amazon landing page';
});


Route::get('/', function () {
    return Redirect::to('https://targetdomain.com/', 301); 
});

It would be nice to have a wiki page on how to do this correctly as this feels like a hack that will go wrong next time I update the app and you overwrite the routes/web.php file.

@Raikia
Copy link
Owner

Raikia commented Jun 19, 2018

Yeah, I do agree with this. This is one of the reasons I actually like running FP on a different port as well, because it makes it a bit easier to handle (you can configure the port to run it on in the installer). That said, the installer is created to allow you to rerun it to reconfigure everything without breakage so that might be a solution for you.

But yeah, Laravel clobbers entire hosting directories, so the solution is really within the installer and configuration of Apache. I'll include this in v2.0, good feedback

@digininja
Copy link
Author

digininja commented Jun 19, 2018 via email

@Raikia
Copy link
Owner

Raikia commented Jun 19, 2018

You should be able to rerun the installer with no issues and not lose any data....

Or you can simply edit "/etc/apache2/sites-available/fiercephish.conf", change the :80 to :[port]

And then edit "/etc/apache2/ports.conf" and insert a "Listen [port]" line. (where [port] is a number)

Then restart Apache.

@digininja
Copy link
Author

digininja commented Jun 19, 2018 via email

@Raikia
Copy link
Owner

Raikia commented Jun 19, 2018

Yes, thats how I made it work. v2.0 will allow you to configure for multiple domains because thats a thing I didn't expect people to need to do frequently but turned out it is needed.

@digininja
Copy link
Author

digininja commented Jun 19, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants