• I want to redirect social media crawlers to a separate snapshot page using the VirtualHost. This is how I have written the virtual host:

    NameVirtualHost *:80

    <virtualhost *:80="">

    ServerName www.mysite.com DocumentRoot /var/www/html/

    <directory var="" www="" html=""/> Allow From All RewriteEngine On RewriteCond %{HTTP_USER_AGENT} (facebookexternalhit/[0-9]|Twitterbot|Pinterest|Google.*snippet) RewriteRule . http://www.mysite.com/snapshot [L] </directory>


    After using this virtual host rule, social media crawling is working fine, but the site stops working, it gives index page not found error.

    Please help me to write a correct virtual host.

  • Thanks!!! Good luck ))))

  • Need help with Apache start error. I can not start it after my failed attempt to install ISPConfig3 on Centos7. I uninstalled and reinstalled apache; but it is giving the same error message. I do not see any syntax error in line 353. Thanks a lot for the help.

    [root@test1 mnasimul]# systemctl status -l httpd

    ‚óŹ httpd.service - The Apache HTTP Server

    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)

    Active: failed (Result: exit-code) since Thu 2017-05-11 15:31:55 EDT; 14min ago

    Docs: man:httpd(8)


    Process: 3695 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)

    Process: 3685 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited,


    Main PID: 3685 (code=exited, status=1/FAILURE)

    May 11 15:31:55 test1.nasim.com systemd[1]: Starting The Apache HTTP Server...

    May 11 15:31:55 test1.nasim.com httpd[3685]: httpd: Syntax error on line 353 of

    /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.d/suphp.conf: Cannot load

    modules/mod_suphp.so into server: /etc/httpd/modules/mod_suphp.so: cannot open shared object file:

    No such file or directory

    May 11 15:31:55 test1.nasim.com systemd[1]: httpd.service: main process exited, code=exited,


    May 11 15:31:55 test1.nasim.com kill[3695]: kill: cannot find process ""

    May 11 15:31:55 test1.nasim.com systemd[1]: httpd.service: control process exited, code=exited


    May 11 15:31:55 test1.nasim.com systemd[1]: Failed to start The Apache HTTP Server.

    May 11 15:31:55 test1.nasim.com systemd[1]: Unit httpd.service entered failed state.

    May 11 15:31:55 test1.nasim.com systemd[1]: httpd.service failed.

  • Redirect from one site to another does not work at all. should i install mod_rewrite module for this or only enough to add entry LoadModule rewrite_module modules/mod_rewrite.so for this?

Log In, Add a Comment