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

Add option to delete default vhosts on Redhat/CentOS as well #81

Open
anisse opened this issue Mar 7, 2016 · 10 comments
Open

Add option to delete default vhosts on Redhat/CentOS as well #81

anisse opened this issue Mar 7, 2016 · 10 comments
Labels

Comments

@anisse
Copy link

anisse commented Mar 7, 2016

There are default vhosts and configuration files in CentOS 7:

  • autoindex.conf
  • userdir.conf
  • welcome.conf

(source: http://mirror.centos.org/centos/7/os/x86_64/Packages/httpd-2.4.6-40.el7.centos.x86_64.rpm )

At least welcome.conf will provide a file if a configured vhost has no /index.html. Maybe something should be done to cleanup these config files ?

@geerlingguy
Copy link
Owner

This functionality should be triggered by apache_remove_default_vhost set to true. I need to check the contents of those files and make sure they're all safe to discard by default, though. I've only been using Nginx on RHEL 7, so I didn't notice those files sneak into the default package install :/

@anisse
Copy link
Author

anisse commented Mar 8, 2016

Yes, it should use the same option. Indeed, a careful review of the files might be needed, as I just gave them a quick glance before deleting on my server.

@stale
Copy link

stale bot commented Mar 6, 2020

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Mar 6, 2020
@stale
Copy link

stale bot commented Apr 5, 2020

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

@stale stale bot closed this as completed Apr 5, 2020
@dspolleke
Copy link

This issue is still relevant. removing userdir.conf welcome.conf and autoindex.conf is needed!

@geerlingguy geerlingguy added bug and removed stale labels Aug 27, 2021
@geerlingguy geerlingguy reopened this Aug 27, 2021
@geerlingguy
Copy link
Owner

Shouldn't have been closed. I'm open to a PR that only does these things (and doesn't affect SSL configs, as #131 did).

@pixelrebel
Copy link

I'm probably doing something wrong, but it seems like this role relies on the ssl.conf default vhost config to enable the LISTEN 443 directive. When that file is removed, there is no other place in the configuration where that LISTEN 443 exists, even if you define an SSL virtualhost in apache_vhosts_ssl. Am I supposed to leave the ssl.conf file in place? When I do, the generic self signed certs take priority.

@Blackskyliner
Copy link

We need to keep the default ssl.conf file and comment most directly vHost related configuration within <VirtualHost _default_:443> and this VirtualHost definition itself off the file via regex pattern. But keep general settings which would also make sense in a global scope e.G. SSLHonorCipherOrder and the "Engine Options" or "Protocol Adjustments".

This way there should be no breakage for ssl on COS/RHEL related systems.

Blackskyliner added a commit to Blackskyliner/ansible-role-apache that referenced this issue Jul 12, 2022
@nitharsandvag
Copy link

Hello @geerlingguy

we are facing the same problem with default ssl.conf and VirtualHost entry on our Redhat System, are you going to merge the changes from @Blackskyliner ?
I have tested the code locally and it is working fine.

@Blackskyliner
Copy link

Related, autoclosed PR here: #237

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

No branches or pull requests

6 participants