Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: how to prevent apache2 under ubuntu 12.10 from blocking HTML Frames?

  1. #1
    Join Date
    Dec 2011
    Beans
    61

    how to prevent apache2 under ubuntu 12.10 from blocking HTML Frames?

    How can I prevent Apache from blocking HTML frames:

    I have my website A installed on /var/www/A
    I have 3rd party website B installed on /var/www/B
    Pages on website A include HTML frames that reference pages on website B
    When connecting to A from a local LAN the frames are working and showing the pages from B
    When connecting to A from the Internet frames doesn't work and instead I get timeout messages.

    I suspect that it relates to X-FRAME directives but not sur if this is the problem or the only problem.
    I already modified the 3rd party website and remove from page "template.php" the line-
    Header(‘X-Frame-Options: Sameorigin’);

    This made it possible to open the pages on the LAN but still can't open them when connecting from the internet

    Tried also to look for X-Frame under .htaccess but not sure I am looking at the right places.

    I appreciate any help since I am lost at this point.
    Thanks.
    Last edited by dvks; March 8th, 2013 at 12:23 AM.

  2. #2
    Join Date
    Feb 2007
    Location
    /home/paris
    Beans
    690
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: how to prevent apache2 under ubuntu 12.10 from blocking HTML Frames?

    Are you able to navigate to web site B directly (without passing through from site A) ?

    If so an #include statement in our html file should do the trick.

    Can you post a snippet of code for how you currently get the page to display inside of A.

    Also depending on how you 'display' the embeded pages from siteB in the frame of siteA may make a difference in Apache.

    are you using the actual < web address > of the siteB page, or are you using a < relative filesystem link >, if you are using a filesystem link this will not very likely work from the net

    David
    Eee pc via Wubi install.
    evertying works straight out of the box

    My Launchpad page

  3. #3
    Join Date
    Dec 2011
    Beans
    61

    Re: how to prevent apache2 under ubuntu 12.10 from blocking HTML Frames?

    Quote Originally Posted by theDaveTheRave View Post
    Are you able to navigate to web site B directly (without passing through from site A) ?

    If so an #include statement in our html file should do the trick.

    Can you post a snippet of code for how you currently get the page to display inside of A.

    Also depending on how you 'display' the embeded pages from siteB in the frame of siteA may make a difference in Apache.

    are you using the actual < web address > of the siteB page, or are you using a < relative filesystem link >, if you are using a filesystem link this will not very likely work from the net

    David
    David , I appreciate your feedback, thanks. Yes I can navigate to website B directly, not through A. The PHP line that does the frame is==> echo "</br><IFRAME SRC= 'http://" . "$ipaddr" . "/B' WIDTH='90%' HEIGHT='600'></IFRAME></br></br>"; as you can see, yes I am using the actual web address (placed in $ipaddr ) and not a relative file system address. by the way for some reason I can't get the line feed work on this browser I hope that my feedback is not a total mess.

  4. #4
    Join Date
    Feb 2013
    Beans
    4

    Re: how to prevent apache2 under ubuntu 12.10 from blocking HTML Frames?

    It could be the way you have nested your quote marks.

    echo '</br><IFRAME SRC="http://' . $ipaddr . '/B" width="1000" height="600"></IFRAME></br></br>';

    Also, the width and height attributes of the iframe tag only take pixel values.


  5. #5
    Join Date
    Feb 2013
    Beans
    4

    Re: how to prevent apache2 under ubuntu 12.10 from blocking HTML Frames?

    The style attribute can be applied to achieve the desired effect:

    echo '</br><IFRAME SRC="http://' . $ipaddr . '/B" style="width:90%; height:600px"></IFRAME></br></br>';

  6. #6
    Join Date
    Dec 2011
    Beans
    61

    Re: how to prevent apache2 under ubuntu 12.10 from blocking HTML Frames?

    It works when I connect from another computer on my LAN it doesn't work only when I connect from the Internet so I assume it is not a syntax or address or the size of the frame but some kind of security setting issue?

  7. #7
    Join Date
    Dec 2011
    Beans
    61

    Re: how to prevent apache2 under ubuntu 12.10 from blocking HTML Frames?

    You lost me, is this the solution for having the frame being blocked when connecting from the internet but ok when connecting from the local LAN?

  8. #8
    Join Date
    Feb 2013
    Beans
    4

    Re: how to prevent apache2 under ubuntu 12.10 from blocking HTML Frames?

    When you get the error message, is it just the IFrame that shows the error, or the whole page?

  9. #9
    Join Date
    Dec 2011
    Beans
    61

    Re: how to prevent apache2 under ubuntu 12.10 from blocking HTML Frames?

    It is an IFRAME problem

  10. #10
    Join Date
    Dec 2012
    Location
    Canada
    Beans
    187
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: how to prevent apache2 under ubuntu 12.10 from blocking HTML Frames?

    Quote Originally Posted by dvks View Post
    The PHP line that does the frame is==> echo "</br><IFRAME SRC= 'http://" . "$ipaddr" . "/B' WIDTH='90%' HEIGHT='600'></IFRAME></br></br>"; as you can see, yes I am using the actual web address (placed in $ipaddr ) and not a relative file system address.
    [...]
    It works when I connect from another computer on my LAN it doesn't work only when I connect from the Internet
    Does $ipaddr contain the server's private local IP address (e.g., 192.168.x.y or 10.x.y.z), or does it contain the public external IP address?

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •