Expand my Community achievements bar.

SOLVED

AEMaaCS immutable file changes, remove the symbolic link?

Avatar

Level 6

I am trying to add new vhost rules, but due to immutible file errors from the AEMaaCS server, I had to create a new vHost file.

in my dispatcher/src/conf.d/enabled_vhosts, I have added new.vhost, and disabled the old.vhost file. Next, I have copied dispatcher/src/conf.d/avaiable_vhosts/old to dispatcher/src/conf.d/avaiable_vhosts/new.vhost. I next make changes in new.vhost, and added some minor changes to new.vhost, and pushed the code into AEMaaCS.

 

Upon making changes to dispatcher/src/conf.d/avaiable_vhosts/new.vhost, I see this text at the top of the file.

#
# This is the default publish virtualhost definition for Apache.
#
# DO NOT EDIT this file, your changes will have no impact on your deployment.
#
# Instead create a copy in the folder conf.d/available_vhosts and edit the copy.
# Finally, change to the directory conf.d/enabled_vhosts, remove the symbolic
# link for default.vhost and create a symbolic link to your copy.
#

In Adobe's instructions, it says 

# Finally, change to the directory conf.d/enabled_vhosts, remove the symbolic
# link for default.vhost and create a symbolic link to your copy.

 

How exactly do I remove the symbolic link for default.vhost and create a symbolic link to my dispatcher/src/conf.d/avaiable_vhosts/new.vhost?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi, 

 

To Remove the existing symbolic link:

You just need to delete the file. Navigate to the directory where the symbolic link is located and run:

rm default.vhost

To Create a new symbolic link:

Navigate to the dispatcher/src/conf.d/enabled_vhost directory where you want to create the new symbolic link. Then, use the ln command to create a new symbolic link pointing to your target (new.vhost)

ln -s ../available_vhosts/new.vhost new.vhost

Make sure you use relative paths while creating the symlink. Please adjust the paths accordingly based on your directory structure.

 

Reference:

https://www.freecodecamp.org/news/linux-ln-how-to-create-a-symbolic-link-in-linux-example-bash-comma...



Esteban Bustamante

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi, 

 

To Remove the existing symbolic link:

You just need to delete the file. Navigate to the directory where the symbolic link is located and run:

rm default.vhost

To Create a new symbolic link:

Navigate to the dispatcher/src/conf.d/enabled_vhost directory where you want to create the new symbolic link. Then, use the ln command to create a new symbolic link pointing to your target (new.vhost)

ln -s ../available_vhosts/new.vhost new.vhost

Make sure you use relative paths while creating the symlink. Please adjust the paths accordingly based on your directory structure.

 

Reference:

https://www.freecodecamp.org/news/linux-ln-how-to-create-a-symbolic-link-in-linux-example-bash-comma...



Esteban Bustamante