How to configure Apache in Ubuntu to work with Certbot?

In my Arch Linux, I configured my Apache in /etc/httpd/conf/httpd.conf as follows for using certbot:

uncomment the following three lines for SSL:

LoadModule ssl_module modules/ LoadModule socache_shmcb_module modules/ Include conf/extra/httpd-ssl.conf 

uncomment the following two lines for Proxy:

LoadModule proxy_module modules/ LoadModule proxy_http_module modules/ 

add port 443 and 8888 as listening ports:

Listen 443 Listen 8888 

Also add SSLCertificateFile & SSLCertificateKeyFile to /etc/httpd/conf/extra/httpd-ssl.conf:

SSLCertificateFile "/etc/letsencrypt/live/" SSLCertificateKeyFile "/etc/letsencrypt/live/" 

As I know that Apache in Ubuntu does not use httpd.conf, but how do I do all these above in Ubuntu 19.04?

Any ideas?

Apache impossible to write in folder

Hello guys,
I installed an apache server on a CentOS VM.
From there I dropped the code of an application in the WWW repository.
I put in my browser the URL of the application and I can properly reach the configuration
page of the application (Normal).
Now, during the configuration the application is trying to create log file in a folder.
Problem: I have always a problem of permission so impossible to install anything.
I tried:
> To give apache user the sudo privilege
> To give 777…

Apache impossible to write in folder

Apache + php7.2-fpm: 503 Service Unavailable

I’m using Ubuntu (server) 18.04 LTS, Apache 2.4.29. I have installed “Webmin” on my server. I’ve enabled HTTP/2 on my server following this tutorial:

So I have disabled php7.2 (a2dismod php7.2) in order to make HTTP/2 work.

Now my virtualhost (created with VirtualMin) works as I want: php script works well and using http/2 protocol.

The problem is that on the machine, php files gives 503 error (while before following the tutorial, they work as expected), so for example a phpinfo file or phpmyadmin of the whole servers is not usable.

Looking at /var/log/apache2/error.log I have the following:

[Fri Aug 30 15:28:24.994748 2019] [proxy:error] [pid 31372:tid 139674947397376] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.2-fpm.sock (*) failed

[Fri Aug 30 15:28:24.994773 2019] [proxy_fcgi:error] [pid 31372:tid 139674947397376] [client] AH01079: failed to make connection to backend: httpd-UDS

Looks like a php7.2-fpm socket problem.

Someone know how can I fix it?

apache won’t index folder from another mount

I’m trying to enable directory listing for a folder outside the web root, from a different local ext4 mount that uses Basic Authentication, but I’m getting an empty list and no logged errors. What’s strange is that if I put in the known location of a file under this directory in my browser, it downloads the file just fine.

enter image description here

Here’s my example.conf file:

<virtualhost *:80>    ServerAdmin   ServerName   ServerAlias     DirectoryIndex index.php   DocumentRoot /var/www/     <Directory />     Options FollowSymLinks     AllowOverride All     </Directory>    LogLevel warn   ErrorLog  /var/apachelogs/error.log   CustomLog /var/apachelogs/access.log combined    Alias /blah2 "/blah1/blah2"     <Location /blah2>               Options +Indexes +MultiViews +FollowSymLinks               IndexOptions +FancyIndexing     </Location>   </virtualhost> 

And here’s my .htaccess

AuthType Basic AuthName "Authentication Required" AuthUserFile "/home/myusername/.htpasswd" Require valid-user 

Also, I’ve commented IndexIgnore out in /etc/apache2/mods-enabled/autoindex.conf

#IndexIgnore .??* *~ *# RCS CVS *,v *,t 

Doing some testing, my configuration works fine if I move /blah1/blah2 under my home directory and run chmod -R 755 ~/blah1/blah2. There’s something about it being on another mount that is messing up mod_autoindex, even though apache can clearly read the files themselves. Removing authentication doesn’t help. With LogLevel warn I get no logged errors. After changing my LogLevel to trace4, here’s my error log.

Here’s the mount line from /etc/fstab:

UUID=[theuuid] /blah1 ext4 rw,nosuid,nodev,errors=remount-ro    0    0 

How do I configure Apache web server to be a reverse proxy server?

Using RHEL 8.x and Apache Web Server, I tried modifying httpd.conf. I based my modifications on this Apache website.

But my results were that in the web browser I saw "Service Unavailable." If I bypassed the Apache web server, the destination web server works fine. I accessed the destination server with an IP address. How do I configure Apache web server to be a reverse proxy server? (I know I have to modify the httpd.conf file. But using "proxypass" variations in the syntax of the…

How do I configure Apache web server to be a reverse proxy server?

Read GET parameters in APACHE Mod Rewrite rules for WordPress categories in Posts

I’m a self-taught programmer with a very little experience in WordPress programming. I’m using a post permalink structure in this way:

I want to have the possibility to optionally have URLs with two “parameters”, “routes”, “deepth-levels” like this:

With APACHE’s mod_rewrite I know I can “convert” a URL like: in some like:

But, in WordPress, how can I do this without messing all the other URLs and routing process-flow? My goal is read the GET params name and color in the functions.php file so I can make some code with that.


I think that a mod_rewrite rule for “converting” / accepting URLs like this in something like this would do the trick! Using add_rewrite_url()

Thanks for reading.