In /etc/apache2/apache2.conf

 <Directory />

        Options FollowSymLinks

 <Directory /var/www/>

        Options Indexes FollowSymLinks

 Might not be the exact one(s), but FollowSymLinks is the thing to set.

 Chris

 
On Saturday, April 27, 2024 at 3:55:01 AM UTC-6 Remy Lavabre wrote:

> Yes thank you it works Vince!
> I've been racking my brains over these Apache directories for a while and 
> I admit I haven't thought about reversing my symbolic links, idiot that I 
> am...! :-(
>
> Perhaps an even simpler solution would have been to put the version 4 path 
> back in weewx.conf...?
>
> However, I would have liked to understand why I was unable to reach my 
> ~/weewx-venv/public_html directory with my initial symbolic links... The 
> rights seemed to have been assigned correctly to the directories.
>
> But in any case it works with your method! So I'm keeping it :-)))
> Thank you Vince and have a good weekend
>
> Le vendredi 26 avril 2024 à 18:44:29 UTC+2, vince a écrit :
>
>> I do it in the opposite direction.   The /var/www/html/weewx path is a 
>> directory.  The /home/<user>/weewx-data/public_html path is a symlink 'to' 
>> the webserver directory.
>>
>> For a pip installation:
>> sudo mkdir /var/www/html/weewx
>> sudo chown ${WEEWXUSER}:${WEEWXUSER} /var/www/html/weewx
>> ln -s /var/www/html/weewx /home/${WEEWXUSER}/weewx-data/public_html
>>
>>
>> On Friday, April 26, 2024 at 7:53:03 AM UTC-7 Remy Lavabre wrote:
>>
>>> 1/ if I try xxx.xxx.xxx.xxx/index.html -> Work fine, I've got the 
>>> Apache2 Debian Default Page (which is in /var/www/html/index.html).
>>> 2/ if i try xxx.xxx.xxx.xxx/weewx/index.html -> Forbidden - You don't 
>>> have permission to access this resource. (with my symbolic link)
>>>
>>> I've tried :
>>> A/ sudo chown www-data ~/weewx-data/public_html -Rf
>>> B/ sudo chmod 775 -R ~/weewx-data/public_html
>>> --> Same thing
>>>
>>> C/ sudo nano /etc/apache2/sites-available/000-default.conf and change 
>>> "DocumentRoot /var/www/html" to "DocumentRoot ~/weewx-data/public_html"
>>>  xxx.xxx.xxx.xxx/index.html *and* xxx.xxx.xxx.xxx/weewx/index.html does 
>>> not work...
>>>
>>> Any idear ??
>>> Le vendredi 26 avril 2024 à 15:46:48 UTC+2, p q a écrit :
>>>
>>>> Looks like a rights issue with Apache. Find the apache.conf file and 
>>>> you probably need to enable access to the right directories.
>>>>
>>>> On Fri, Apr 26, 2024 at 6:26 AM Remy Lavabre <remy.l...@gmail.com> 
>>>> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> Good morning,
>>>>> I didn't find the answer to my problem in the various discussions on 
>>>>> the WeeWX forum...
>>>>>
>>>>> I installed Weewx 5 in a virtual environment.
>>>>> So I have my weewx-data and weewx-venv directories in /home/---/
>>>>>
>>>>> weewxd seems to "finally" work normally with the 
>>>>> ~/weewx-data/public_html directory refreshing.
>>>>>
>>>>> On version 4, the weewx public_html directory was /var/www/html/weewx 
>>>>> ROOT:ROOT and did not pose a problem with the Apache 2 server.
>>>>> Since the location of the web server changed in version 5, I put a 
>>>>> symbolic link "weewx" in /var/www/html/ pointing to 
>>>>> ~/weewx-data/public_html/weewx [sudo ln -s/ ~/ 
>>>>> weewx-data/public_htmlweewx 
>>>>> /var/www/html/weewx].
>>>>>
>>>>> The rights of var/www/html remained ROOT:ROOT while the rights of 
>>>>> ~/weewx-data/public_html/weewx are those of the creator.
>>>>>
>>>>> Filezilla navigation works correctly. Clicking on the symbolic link 
>>>>> takes you to the new WeeWX 5 public_html directory.
>>>>>
>>>>> However, when trying to connect through a web browser (
>>>>> http://xxx.xxx.xxx.xxx/weewx/index.html), I get the response:
>>>>> :
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> *ForbiddenYou don't have permission to access this 
>>>>> resource.Apache/2.4.59 (Debian) Server at xxx.xxx.xxx.xxx Port 80*
>>>>>
>>>>> I think it must just be a rights issue...?
>>>>>
>>>>> *What is the recommended solution in Weewx 5 with Apache 2 to redirect 
>>>>> Apache from /var/www/html to ~/weewx-data/public_html?*
>>>>>
>>>>> Thanks a lot for the help! ;-)
>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "weewx-user" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to weewx-user+...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/weewx-user/1deda7f3-fa1e-4ab8-8ef7-a7b561fa9ffen%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/weewx-user/1deda7f3-fa1e-4ab8-8ef7-a7b561fa9ffen%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>
>>>>
>>>> -- 
>>>> Peter Quinn
>>>> (415)794-2264 <(415)%20794-2264>
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/4d2f9188-270c-424f-af4f-b0ea1fe5d8e7n%40googlegroups.com.

Reply via email to