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

Additional flags and settings for vhost? #70

Closed
peixotorms opened this issue Sep 19, 2023 · 3 comments
Closed

Additional flags and settings for vhost? #70

peixotorms opened this issue Sep 19, 2023 · 3 comments

Comments

@peixotorms
Copy link

peixotorms commented Sep 19, 2023

Hi,

I setup OLS with percona and then I am trying to add a new host.
For that I am using:

/bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh ) -d dev.example.com -le no-reply@dev.example.com -f --path /home/sites/dev.example.com/www

However, I would also like to be able to:

a) specify a flag to create a database (optional flag) as well as database name, password, host and port.

There is the wordpress option, but not all the time we need to install wordpress while still needing to create a database.
Some other times we just need the virtual host, so creating a database should be optional.

I think an option to create databases and credentials would be useful, and at the same time the options to specify a host and port are also useful when we use a remote server or a service like AWS RDS for example.

b) specify a group and user for the files and suEXEC

On Virtual Host > Security
There are options for:
Follow Symbolic Link | Yes
Enable Scripts/ExtApps | Yes
Restrained | Yes
External App Set UID Mode | DocRoot UID
suEXEC User | myusername
suEXEC Group | myusergroup

This would improve security, if a user/group is specified, else default settings.
Changing this would require changing the ownership and permissions of that directory to match.

c) In addition to --path we should be able to specify --root (or change the --path behaviour)

Currently, --path defines the Virtual Host Root, but according to the help section "This is NOT the document root. It is recommended to place all files related to the virtual host (like log files, html files, CGI scripts, etc.) under this directory. Virtual Host Root can be referred to using the variable $VH_ROOT."

So, we could do --root /home/sites/dev.example.com --path /www for example.

Or just stay as --path /home/sites/dev.example.com and later append /www to the Document Root

By using the last one, you could also set the logs directory to /home/sites/dev.example.com/logs for example, or add another --logs (or similar) option to set the path.

If this is something you can implement, it would be great!

Thank you

@Code-Egg
Copy link
Collaborator

Latest commit should satisfy the item a.

        --create-db-only
                To install OpenLiteSpeed and MySQL
        --dbname [DATABASENAME]
                To set the database name to be used by WordPress.
        --dbuser [DBUSERNAME]
                To set the WordPress username in the database.
        --dbpassword [PASSWORD]
                To set the WordPress table password in MySQL instead of using a random one.

So far, no plan to add additional options for the virtual host details configuration. Users can simply update any config from the web admin once it's created.
Feel free to give it a try, and thanks for the report.

@peixotorms
Copy link
Author

Maybe please consider adding --dbhost and --dbport in the future, so it can support AWS RDS and remote database servers?

@Code-Egg
Copy link
Collaborator

Sure, can do

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

No branches or pull requests

2 participants