ucd-library / aggie-experts

Publicly reported feedback and issues for Aggie Experts
https://ucd-library.github.io/aggie-experts/
MIT License
1 stars 2 forks source link

Do *not* respond to non-existent expert instances #402

Closed qjhart closed 1 month ago

qjhart commented 1 month ago

Currently, the apache router for experts routes requests from unknown Virtual Hosts, to some instance, fairly randomly. This is not appropriate. Non-explicit virtual hosts shouldn't engage.

Expected behavior Requests to not explicit servers, eg. foo.experts.library.ucdavis.edu should respond with a 404.

qjhart commented 1 month ago

Updated apache with these default VirtualHosts

<VirtualHost _default_:80>
  Redirect 404 /
  ErrorDocument 404 "Not Found"
</VirtualHost>

<VirtualHost _default_:443>
  Redirect 404 /
  ErrorDocument 404 "Not Found"
  SSLCertificateFile      /etc/ssl/certs/__experts_library_ucdavis_edu_cert.cer
  SSLCertificateKeyFile /etc/ssl/private/__experts.library.ucdavis.edu.key
  SSLCertificateChainFile /etc/ssl/certs/incommon_interm.cer
</VirtualHost>
qjhart commented 1 month ago

I added a similar guard to *.experts.ucdavis.edu