0

I have problem with apache2. I'm new to it and I'm trying to solve some problems. I have a server running debian with apache2.4 installed and 3 web-site running. A Shiny Server, a django website and a static website. The three sites are located differently The Static webiste is a blogdown site located at /var/www/html/mysite with an assigned alias to it mysite.com/blog/. The problem is that surf on that site i cannot load any css or I'm not able o access every subpage of this website. Instead of holding the /blog/link-to-some-page address apache2 is driving me to /link-to-some-page. Here my apache2 config file.

<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /srv/dev-disk-by-label-disco1/django/wrkt-site <Directory /srv/dev-disk-by-label-disco1/django/wrkt-site> Options FollowSymLinks AllowOverride All Order deny,allow Allow from all </Directory> Alias /static /srv/dev-disk-by-label-disco1/django/wrkt-site/static <Directory /srv/dev-disk-by-label-disco1/django/wrkt-site/static> Require all granted </Directory> <Directory /srv/dev-disk-by-label-disco1/django/wrkt-site> <Files wsgi.py> Require all granted </Files> </Directory> WSGIDaemonProcess wrkt python-path=/srv/dev-disk-by-label-disco1/django/wrkt-site/ python-home=/srv/dev-disk-by-label-disco1/django/wrkt-site/venv WSGIProcessGroup wrkt WSGIScriptAlias / /srv/dev-disk-by-label-disco1/django/wrkt-site/wrkt/wsgi.py Alias /blog "/var/www/html/mysite" <Directory "/var/www/html/mysite"> Options FollowSymLinks AllowOverride None </Directory> # Proxy rules ProxyRequests Off ProxyPreserveHost On ProxyPass /stats-apps http://localhost:3333/ ProxyPassReverse /stats-apps http://localhost:3333/ ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined 

And here there are the errors that errors.log is giving me:

[Mon Sep 27 15:01:23.486805 2021] [wsgi:error] [pid 6689] [remote XXX.XX.XX.XXX:60541] Not Found: /css/main.css [Mon Sep 27 15:01:23.504880 2021] [wsgi:error] [pid 6689] [remote XXX.XX.XX.XXX:58335] Not Found: /css/fonts.css [Mon Sep 27 15:01:23.506045 2021] [wsgi:error] [pid 6689] [remote XXX.XX.XX.XXX:56566] Not Found: /images/logo.png [Mon Sep 27 15:01:23.507491 2021] [wsgi:error] [pid 6689] [remote XXX.XX.XX.XXX:50814] Not Found: /images/hugo-logo.png 

I'm really in trouble to solve this.

Marco

3
  • The blogdown software should have an option to generate the links correctly with the /blog prefix you have chosen. Check its documentation carefully. Commented Sep 28, 2021 at 13:41
  • @MichaelHampton going in the config.yaml and modifying the baseurl parameter solved. The problem now is that if I try to access to a post of the blog, instead of /blog/post-01 is giving me /blog/blog/post-01 with all links for posts incorrects Commented Sep 29, 2021 at 12:50
  • I searched for some help in the guide link but I was not able to find something that helped me. Commented Sep 29, 2021 at 12:58

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.