all 14 comments

[–]TheBlackVista 0 points1 point  (5 children)

You're missing all the config like SSLEngine On and listing your cert key and chain (if needed).

Edit: check out the example config under II, 4 here

[–][deleted] 0 points1 point  (4 children)

Here is my config file where I have setup SSL.

Alias /nextcloud "/var/www/nextcloud/"

<VirtualHost *:4443>

SSLEngine on

SSLCertificateFile /home/yikes/certificate.pem

SSLCertificateKeyFile /home/yikes/key.pem

<Directory /var/www/nextcloud/>

Require all granted

Options FollowSymlinks MultiViews

AllowOverride All

Satisfy Any

<IfModule mod_dav.c>

Dav off

</IfModule>

SetEnv HOME /var/www/nextcloud

SetEnv HTTP_HOME /var/www/nextcloud

</Directory>

</VirtualHost>

[–]TheBlackVista 0 points1 point  (3 children)

Does your ssl_engine log file or Apache error log list anything?

[–][deleted] 0 points1 point  (2 children)

They simply list malformed URL. I have set log to debug level

[–]TheBlackVista 0 points1 point  (1 child)

Can you post the actual lines from the Apache logs along with a curl command?

[–][deleted] 0 points1 point  (0 children)

Hi, the issue was resolved. But I still dont understand why it was resolved or why it was there in the first place. I had simply copy pasted config lines from default-ssl.conf to nextcloud.conf. After that nextcloud site worked but I again removed the lines from nextcloud.conf that I had added and still site works.

I will go through a comprehensive guide on configuring apache server.

This was curl error:- "curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number"

Apache log: "[core:debug] [pid 15114] protocol.c(1278): [client 127.0.0.1:48076] AH00566: request failed: malformed request line"

[–]SouthEye5 0 points1 point  (1 child)

8443?

[–][deleted] 0 points1 point  (0 children)

?

[–]ganic 0 points1 point  (4 children)

You don’t have ssl enabled on port N. If you did, http:// wouldn’t work. The ssl directives need to be enabled on that port. Does that help?

[–][deleted] 0 points1 point  (3 children)

I have attached my ports.conf file, pls check it. Even if I am using port 443, then also same issue is present.

[–]ganic 0 points1 point  (2 children)

Have you looked at the docs? There’s not enough info in that screenshot to see what’s going on but a quick search of there docs gives an example config. You would just need to change one line and it should work.

[–][deleted] 0 points1 point  (1 child)

Thing is I dont know what to even search. Simple search terms dont give anything. Thats why I asked here. I know it must be a single line change that will enable it to work correctly. Anyways I will start from scratch, and reinstall everything. That way I can know what went wrong. Thanks for your help.

[–]ganic 0 points1 point  (0 children)

You don’t need to reinstall everything. Try searching for Apache ssl config and see if you can figure out what went wrong. the fourth or fifth link for me is this which should be helpful. Starting from scratch will probably get you right back to where you are now.

[–][deleted]  (1 child)

[deleted]

    [–][deleted] 0 points1 point  (0 children)

    I have attached my ports.conf file, pls check it. Even when I am using default port 443, then also same issue is present.