cppreference-doc_debian icon indicating copy to clipboard operation
cppreference-doc_debian copied to clipboard

Apache2 config files

Open ll-h opened this issue 6 years ago • 0 comments

Hi,

I didn't find any instructions to actually running the website, so I made one for Apache2. Assuming the Debian package is installed, put in /etc/apache2/sites-available:

  • cppreference-en.conf
Alias /cppreference/en "/usr/share/cppreference/doc/html/en"    
     
<Directory /usr/share/cppreference/doc/html/en>    
    Options +FollowSymlinks    
    AllowOverride All    
     
    Require all granted    
     
    SetEnv HOME /usr/share/cppreference/doc/html/en    
    SetEnv HTTP_HOME /usr/share/cppreference/doc/html/en    
</Directory>
  • cppreference-common.conf
Alias /cppreference/common "/usr/share/cppreference/doc/html/common"            
    
<Directory /usr/share/cppreference/doc/html/common>    
    Options +FollowSymlinks    
    AllowOverride All    
    
    Require all granted    
    
    SetEnv HOME /usr/share/cppreference/doc/html/common    
    SetEnv HTTP_HOME /usr/share/cppreference/doc/html/common    
</Directory>

Then:

cd /etc/apache2/sites-available
sudo a2ensite cppreference-*
sudo systemctl reload apache2 # or start if not started yet

Finally, access the offline reference at the URL localhost/cppreference/en. I know that it sounds like just using the URL file:///usr/share/cppreference/doc/html/en/index.html with extra steps but some web browsers don't remember the zoom level from one file to the other and disable cookies for local files whereas with a non-file URL through a web server it works.

Maybe this shouldn't have been written in an issue. Please feel free to close this issue if instructions for this were actually there.

ll-h avatar Sep 19 '19 22:09 ll-h