1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

httpd.config - regex help needed

Discussion in 'Apache' started by BlueNC, Apr 6, 2015.

  1. #1
    I am not even sure if this is possible, what I am trying to accomplish, but I ask the Gurus anyways.
    I have a VPS on which I plan to host a few Wordpress sites (please no bashing of Wordpress, gggg). Instead of placing htaccess files in each /home/www/user/wp-content/uploads folder, and since wordpress can be in it's own subdirectory, I was wondering, if there is a regex solution I could put into the httpd.conf that would prevent any kind of script execution on any folder named "uploads" ?
    SEMrush
    I hope this made some sense. Any help is greatly appreciated.
     
    BlueNC, Apr 6, 2015 IP
    SEMrush
  2. HMB Shiraz

    HMB Shiraz Member

    Messages:
    52
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    25
    #2
    Why not just change the file permissions to not allow script executions? I'm assuming you're doing this as a security step :)

    Depends on your web server config, but you should be able to set the permissions to 644 using chmod and that will stop execution but keep them readable (again, it might not work as it depends on the specific config of your webserver)
     
    HMB Shiraz, Apr 6, 2015 IP
    billzo likes this.
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,630
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    And how, exactly, is that going to prevent a php or javascript from running? Scriptprevention, not "running files on the server" - anything in those folders, be it html,js, php or other web-server parseable code will still run at the level the webserver is running.
     
    PoPSiCLe, Apr 6, 2015 IP