How do I change www-data home directory from /var/www to /home/www-data?

53

The simple answer is:

usermod -d /home/www-data www-data

But keep in mind you are changing the Ubuntu apache defaults and maybe breaking some things. Check the Ubuntu docs for details here.

Share:
53

Related videos on Youtube

Max
Author by

Max

Updated on September 18, 2022

Comments

  • Max
    Max almost 2 years

    so following issue: I have a map of a country with different postal code zones and if a postal zone is selected in a dropdown (in total two will be selected, departure and arrival more or less) then the picture referring to that postal zone should show up, otherwise it should stay hidden. I created a column where a 1 is typed in by formula if that region is selected and a 0 if that region is not selected.

    So I have this now, which should go on for several times with all the postal codes:

    Sub Test1()
    If Range("AK10") = 1 Then
      ActiveSheet.Shapes.Range(Array("ES1")).Visible = msoTrue
    
    
    End If
    
    If Range("AK11") = 1 Then
      ActiveSheet.Shapes.Range(Array("ES2")).Visible = msoTrue
    
    
    End If
    
    End Sub
    

    Somehow it does not work. Any ideas on that?

    Edit: I now did it as a worksheet event to run but still does not work

    Sub Worksheet_Change(ByVal Target As Range)
       If Target = Range("AK10") = 1 Then
      ActiveSheet.Shapes.Range(Array("ES1")).Visible = msoTrue
        End With
        Target.Select
    
    End If
    
     If Target = Range("AK11") = 1 Then
      ActiveSheet.Shapes.Range(Array("ES2")).Visible = msoTrue
        End With
        Target.Select
    
    End If
    
    
     End Sub
    

    Any further ideas?

    Best Max

    • dwirony
      dwirony about 6 years
      If you want to have this run automatically, you'll need to place it in a Worksheet_Change event.
    • Harassed Dad
      Harassed Dad about 6 years
      Normally you'd refer to the shape by name or number, so either Shapes("my map name"),visible = true Or shapes(2).visible = true
  • ceejayoz
    ceejayoz about 11 years
    Why are you linking to 8.04's server guide? We're on 12.10 now... and 13.04 has the same doc. help.ubuntu.com/13.04/serverguide/httpd.html
  • Max
    Max about 6 years
    Ok so I've done this now: see above