0

how can I configure a swoole http-server without nginx? my problem is domain routing. where can I configure a specific domain for swoole http-server in laravel octane? I have configured an nginx on my server that points to my subdomains (api.domain.com, portal.domain.com). api and portal both use octane to serve requests. I wanna know how can I drop nginx and use swoole http-server directly?

thanks in advance and sorry for my eng

1 Answer 1

0

Using NGINX as the webserver, load balancer, or reverse proxy (your use case) is not a bad idea. Let your application handle your business, not web server stuff.

But if you want to handle domains or subdomains in your Laravel application, you can use the Laravel router.

Route::domain('{account}.example.com')->group(function () {
    Route::get('user/{id}', function ($account, $id) {
        //
    });
});

Laravel documentation: https://laravel.com/docs/8.x/routing#route-group-subdomain-routing

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.