Skip to content

The command apachectl -t failed #1034

@rehankausarDev

Description

@rehankausarDev

We are building a SaaS system where every customer will have access to our system. As soon as the system opens a new account, a subdomain will be created for the customer.
Now to add this subdomain to the apache vhost I need to run the command "apachectl -t" and "apachectl graceful" on the user running the script.
Apache can load the new vhost configuration. But the user running the script does not have permission to run the command "apachectl -t". All that the user needs is permission to run these two commands to load the configuration and register the subdomain.

"The command \"apachectl -t\" failed.\n\nExit Code: 1(General error)\n\nWorking directory: /home/systemhubs/public_html\n\nOutput:\n================\n\n\nError Output:\n================\nhttpd: Could not open configuration file /etc/apache2/conf/httpd.conf: Permission denied\n"
could you please let me know how I can solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions