while maintaining sites previously published in /var/www/html
I would also like to publish a new /opt/xxx
directory.
I looked it up and found that I could do it with Alias from httpd.conf.
Alias seemed to change every root directory.
I want to keep the root directory
Could you please let me know if there is a good way?
If you publish it as a subdirectory, I think it's easy to create symbolic links quickly.
Example: (Procedure to publish a directory other than the document root in Redmine)
$cd/var/www/html
$ sudorn-s/var/lib/redmine/public redmine
→ Browser accessible in the form localhost/redmine
As a reminder, the original directory you want to publish should be accessible to your web server's process (account).
There may be situations where you cannot operate the file system, so
Here's how to configure only httpd.conf
.
There was an example close to this
https://serverfault.com/questions/295975/add-a-directory-to-the-apache-web-root
Alias/opt-xxx/opt/xxx
<Directory/opt/xxx>
Order allow, deny
Allow from all
</Directory>
By writing like this,
http://hoge.com/opt-xxx/file1.jpg
->/opt/xxx/file1.jpg
You will have access similar to .
© 2024 OneMinuteCode. All rights reserved.