mod_alias alias
Per documentation here:
Modify Virtualhost Containers With Include Files - Easy Apache - cPanel Documentation
I am trying to create an alias, which does not seem to work.
I've created the directory's and files here:
/usr/local/apache/conf/userdata/ssl/2_4/jpadmin/store..com/sitemap.conf
and
/usr/local/apache/conf/userdata/std/2_4/jpadmin/store..com/sitemap.conf
Inside the sitemap.conf files I have:
Alias "/sitemaps/sitemap_mydomain.xml"
Then I did an apache restart in WHM.
When I go here:
-
Hello, Are you using EasyApache 3, or EasyApache 4? If you are using EA4, note the documentation is updated for EasyApache 4 and available at: Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation The correct paths for EA4 are: /etc/apache2/conf.d/userdata/std/2_4/user/domain/includename.conf /etc/apache2/conf.d/userdata/ssl/2_4/user/domain/includename.conf Also, if I understand correctly, I believe you are looking for an entry like the one referenced on this StackOverflow link: Apache Alias Question Thank you. 0 -
Hello, Are you using EasyApache 3, or EasyApache 4? If you are using EA4, note the documentation is updated for EasyApache 4 and available at: Apache Alias Question Thank you.
Was sure that was going to fix it!.. thx.. however, it is still not working. As the doc says, I made sure to do: /usr/local/cpanel/scripts/rebuildhttpdconf and /usr/local/cpanel/scripts/restartsrv_httpd I also created a more global version at: /etc/apache2/conf.d/userdata/ssl/2_4/jpadmin (thinking it may not pick up on the domain). I'm not sure if I have the right apache syntax now. I tried this one as well: Alias /sitemap.xml /sitemaps/sitemap_dolls_store_view.xml I wonder if there is a simple apache directive that I could add.. just to make sure the 'sitemap.conf' file is being triggered??? Thx, Donovan0 -
hmmm.. I also wonder if Magento's .htaccess file is messing with this (as I think .htaccess get's parsed before the userdata config ). Good thing it's the weekend. :-) 0 -
Hello, Ensure to also run the following command after making the changes: /usr/local/cpanel/scripts/ensure_vhost_includes --all-users
Thank you.0 -
Thanks Michael, still no go. Maybe I should explain a little clearer.. as maybe I'm not quite understanding how to do this. I have file in my HTML root at the path /sitemaps/sitemap_dolls_store_view.xml I am wanting any call to /sitemap.xml to alias that file. Right now it is not working (I get a 404): 0 -
Hello, Could you open a support ticket using the link in my signature so we can take a closer look? Thank you. 0 -
Hi Michael, I would, but I don't have time.. I came up with a workaround using .htaccess: RewriteCond %{HTTP_HOST} () [NC] RewriteRule ^sitemap.xml$ /sitemaps/sitemap_.xml [NC,L] I have Magento installed that is configured for multiple stores (domains).. which uses the same root directory of files. So, I needed to dynamically serve up sitemap.xml files (which is usually stored in the root directory) for each store instance based on domain. So, if anyone else runs into this.. the only way I could figure out how to do that (since I couldn't get mod_alias to work) was to use .htaccess... replace with the text of your domain. Just an FYI.. I have ran into the mod_alias problem before. For some reason, I can never get it to work in cPanel.. when it is *really easy* to do in a server without cPanel. I wish I had time to look at it further, but I don't. Sincerely, Donovan 0
Please sign in to leave a comment.
Comments
7 comments