Skip to content

[feature request]enhanced server object capabilities for easier access and modification of nginx configuration #47

@mofantor

Description

@mofantor

propose to enhance the server object by adding new attributes and methods that will simplify the access and modification of its listening configuration, location details, and other pertinent settings. The following are potential enhancements and features that could be incorporated:

// get server by servername
server := conf.GetBlock(*.config.HTTP).GetServerByServerName("example.com")

// get all listening ports for the server
listenPorts := server.GetListenPorts()

// change the first listen port configuration to 8080
server.Listens[0].SetListenPort(8080)

// retrieve all location configurations for the server
locations := server.GetLocations()

Please consider implementing these functionalities to streamline working with complex server configurations and encourage more robust and dynamic management of Nginx setup through this library.

Let's discuss the feasibility and potential implementation details for these enhancements under this issue thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions