#16
  1. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2003
    Location
    Thessaloniki
    Posts
    1,280
    Rep Power
    13
    requinix i could use your help here!
    What is now proved was once only imagined!
  2. #17
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    862
    Rep Power
    275
    Do you have full access to this server?...meaning can you SSH into it?

    If so, run the following command to make sure the UserDir module is enabled [assuming Linux OS]
    Code:
    sudo a2enmod userdir
    ...then, restart APACHE for the change to take effect.
    And see if that helps any.
  4. #18
  5. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2003
    Location
    Thessaloniki
    Posts
    1,280
    Rep Power
    13
    Hello, i own the remote server and yes i have ssh access in its CentOS v6.4

    should i try: a2enmod userdir because sudo doesnt exist in CentOS?

    also please explain to me what UserDir module is and what is supposre to do.
    What is now proved was once only imagined!
  6. #19
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    862
    Rep Power
    275
    If you are logged in as root user thru SSH then you don't need sudo.

    As for the UserDir module, I suggest you read the Documentation for it to learn "exactly" what it does...but, it essentially allows you to use User Home directories as web directories...which appears to me, what you are trying to do.

    **As a sidenote, requinix has already asked you about this very same thing in the beginning of the thread..several times.
    Last edited by DonR; June 13th, 2013 at 09:46 AM.
  8. #20
  9. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2003
    Location
    Thessaloniki
    Posts
    1,280
    Rep Power
    13
    Originally Posted by DonR
    If you are logged in as root user thru SSH then you don't need sudo.

    As for the UserDir module, I suggest you read the Documentation for it to learn "exactly" what it does...but, it essentially allows you to use User Home directories as web directories...which appears to me, what you are trying to do.

    **As a sidenote, requinix has already asked you about this very same thing in the beginning of the thread..several times.


    root@nikos [~]# a2enmod userdir
    -bash: a2enmod: command not found


    requinix yes asked me to look for mod_user but i dont know wht that is or how to check whether was enbled or not.

    iam on CentOS not Debian-like Linux.
    What is now proved was once only imagined!
  10. #21
  11. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    862
    Rep Power
    275
    google really is your friend.

    Found THIS on first search.
  12. #22
  13. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2003
    Location
    Thessaloniki
    Posts
    1,280
    Rep Power
    13
    [Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173] FileNotFoundError: [Errno 2] \\u0394\\u03b5\\u03bd \\u03c5\\u03c0\\u03ac\\u03c1\\

    u03c7\\u03b5\\u03b9 \\u03c4\\u03ad\\u03c4\\u03bf\\u03b9\\u03bf \\u03b1\\u03c1\\u03c7\\u03b5\\u03af\\u03bf \\u03ae \\u03ba\\u03b1\\u03c4\\u03ac\\u03bb\\u03bf\\u03b3\\u03bf\\u03c2: '/home/nikos/public_html//home/dauwin/public_html/index.html', referer: http://superhost.gr/
    [/code]

    DO YOU SEE THIS PART:
    '/home/nikos/public_html//home/dauwin/public_html/index.html', referer: http://superhost.gr/

    Do you see that it prepends nikos path the your dauwin path and file name. It isn't replacing one with the other. Somewhere in my code i perhaps have set the nikos path as the start of a filename. I'll Check that out

    shpudl i do that or shoudl i try the userdir mode?
    What is now proved was once only imagined!
  14. #23
  15. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2003
    Location
    Thessaloniki
    Posts
    1,280
    Rep Power
    13
    Code:
    On 13/6/2013 6:35 μμ, Joel Goldstick wrote:> [Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173] 
    > FileNotFoundError: [Errno 2] \\u0394\\u03b5\\u03bd 
    > \\u03c5\\u03c0\\u03ac\\u03c1\\
    > 
    >     u03c7\\u03b5\\u03b9 \\u03c4\\u03ad\\u03c4\\u03bf\\u03b9\\u03bf
    >     \\u03b1\\u03c1\\u03c7\\u03b5\\u03af\\u03bf \\u03ae
    >     \\u03ba\\u03b1\\u03c4\\u03ac\\u03bb\\u03bf\\u03b3\\u03bf\\u03c2:
    >     '/home/nikos/public_html//home/dauwin/public_html/index.html',
    >     referer: http://superhost.gr/
    >
    >
    > DO YOU SEE THIS PART:
    > '/home/nikos/public_html//home/dauwin/public_html/index.html',
    > referer: http://superhost.gr/
    >
    > Do you see that it prepends your nikos path the your dauwin path and
    > file name. It isn't replacing one with the other. Somewhere in your
    > SFBI mess of code you perhaps have set the nikos path as the start of a
    > filename. Check that out

    yes i saw your post Joel,

    After research i am under the impression that i'am in need for UserDir directive as it essentially allows you to use User Home directories as web directories...

    So after reading this: http://centosforge.com/node/how-get-userdir-user-specific-publichtml-working-apache-centos-6
    i did this:


    <IfModule !mod_ruid2.c>
    UserDir public_html
    </IfModule>
    <IfModule mod_ruid2.c>
    #UserDir disabled
    UserDir "enabled *"
    UserDir "disabled root"
    </IfModule>



    root@nikos [~]# chmod 711 /home
    root@nikos [~]# chmod 711 /home/nikos
    root@nikos [~]# chmod 755 /home/nikos/public_html/
    root@nikos [~]# chmod o+r /home/nikos/public_html/index.html
    root@nikos [~]# chmod 711 /home/dauwin
    root@nikos [~]# chmod 755 /home/dauwin/public_html/
    root@nikos [~]# chmod o+r /home/dauwin/public_html/index.html
    root@nikos [~]#

    setsebool -P httpd_enable_homedirs true
    chcon -R -t httpd_sys_content_t /home/testuser/public_html
    (the last one one failed though)
    [/CODE]

    the i restarted Apache but the problem is still there.

    Code:
    [Thu Jun 13 19:50:57 2013] [error] [client 79.103.41.173]   File "/home/nikos/public_html/cgi-bin/metrites.py", line 213, in <module>
    [Thu Jun 13 19:50:57 2013] [error] [client 79.103.41.173]     with open( '/home/nikos/public_html/' + page, encoding='utf-8' ) as f:
    [Thu Jun 13 19:50:57 2013] [error] [client 79.103.41.173] FileNotFoundError: [Errno 2] \\u0394\\u03b5\\u03bd \\u03c5\\u03c0\\u03ac\\u03c1\\u03c7\\u03b5\\u03b9 \\u03c4\\u03ad\\u03c4\\u03bf\\u03b9\\u03bf \\u03b1\\u03c1\\u03c7\\u03b5\\u03af\\u03bf \\u03ae \\u03ba\\u03b1\\u03c4\\u03ac\\u03bb\\u03bf\\u03b3\\u03bf\\u03c2: '/home/nikos/public_html//home/dauwin/public_html/index.html'
    pelase suggest something.
    What is now proved was once only imagined!
  16. #24
  17. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    862
    Rep Power
    275
    What is the DocumentRoot setting for your superhost.gr domain?

    I will bet that it points to your /home/nikos/public_html directory and that is why when you use superhost.gr in your link it is grabbing the python file from /home/nikos/cgi-bin...which has everything tied to the /home/nikos directory.

    If you want to use other DocumentRoot directories, you will need to setup a Sub-domain such as dauwin.superhost.gr and setup a VirtualHost in Apache for dauwin.superhost.gr that has a DocumentRoot that points to /home/dauwin/public_html...at least thats how I see it.
  18. #25
  19. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2003
    Location
    Thessaloniki
    Posts
    1,280
    Rep Power
    13
    Code:
    root@nikos [~]# cat /usr/local/apache/conf/httpd.conf | grep "DocumentRoot"
        DocumentRoot /usr/local/apache/htdocs
        DocumentRoot /usr/local/apache/htdocs
        DocumentRoot /home/akis/public_html
        DocumentRoot /home/byzantio/public_html
        DocumentRoot /home/cafebar/public_html
        DocumentRoot /home/dauwin/public_html
        DocumentRoot /home/gkelos/public_html
        DocumentRoot /home/mythos/public_html
        DocumentRoot /home/nikos/public_html
        DocumentRoot /home/panos/public_html
        DocumentRoot /home/pdimou/public_html
        DocumentRoot /home/radio/public_html
        DocumentRoot /home/tasos/public_html
        DocumentRoot /home/ypsiland/public_html
        DocumentRoot /home/mythos/public_html/oliveoils
        DocumentRoot /home/pdimou/public_html/zimotirio
        DocumentRoot /usr/local/apache/htdocs
    root@nikos [~]#
    What is now proved was once only imagined!
  20. #26
  21. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2003
    Location
    Thessaloniki
    Posts
    1,280
    Rep Power
    13
    please take an overall look at my httpd.conf at http://pastebin.com/Pb3VbNC9 in case you want to examine somehting else.

    Thank you very much.
    What is now proved was once only imagined!
  22. #27
  23. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2003
    Location
    Thessaloniki
    Posts
    1,280
    Rep Power
    13

    Question


    My code is not finding a file named this:
    '/home/nikos/public_html//home/dauwin/public_html/index.html The first part of this file path is:'/home/nikos/public_html

    After that are TWO forward slashes which remind me of http:// and following that is the path i want.

    Since i'm not idiot enough to use the path '/home/nikos' in a script running under username 'dauwin' here are the proofs:

    Code:
    root@nikos [~]# cat /home/dauwin/www/cgi-bin/metrites.py | grep "/home/nikos/"
    
    root@nikos [~]# cat /home/dauwin/www/cgi-bin/metrites.py | grep "/home/dauwin/"
            page = file.replace( '/home/dauwin/public_html/', '' )
                    with open( '/home/dauwin/public_html/' + page, encoding='utf-8' ) as f:
                    pypage = subprocess.check_output( '/home/dauwin/public_html/cgi-bin/' + page )
    root@nikos [~]#

    I believe that no matter if i browse 'htt://superhost.gr' or 'http://superhost.gr/~dauwin'

    somethign happens with the DocumentRoot of the domain and the web URL translate to file '/home/nikos/public_html/cgi-bin/metrites.py' for any http://superhost.gr/* request.

    So, an Apache configuration is in order and not a python code alternation.

    Please don't quit helping me.
    What is now proved was once only imagined!
  24. #28
  25. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    862
    Rep Power
    275
    your dauwin setup is listed below and it is setup to use the domain dauwin.gr to access it.
    Code:
    <VirtualHost 82.211.30.133:82>
        ServerName dauwin.gr
        ServerAlias www.dauwin.gr
        DocumentRoot /home/dauwin/public_html
        ServerAdmin webmaster@dauwin.gr
        UseCanonicalName Off
        CustomLog /usr/local/apache/domlogs/dauwin.gr combined
        CustomLog /usr/local/apache/domlogs/dauwin.gr-bytes_log "%{%s}t %I .\n%{%s}t %O ."
        ## User dauwin # Needed for Cpanel::ApacheConf
        UserDir enabled dauwin
        <IfModule mod_suphp.c>
            suPHP_UserGroup dauwin dauwin
        </IfModule>
        <IfModule !mod_disable_suexec.c>
            <IfModule !mod_ruid2.c>
                SuexecUserGroup dauwin dauwin
            </IfModule>
        </IfModule>
        <IfModule mod_ruid2.c>
            RMode config
            RUidGid dauwin dauwin
        </IfModule>
        ScriptAlias /cgi-bin/ /home/dauwin/public_html/cgi-bin/
     
     
        # To customize this VirtualHost use an include file at the following location
        # Include "/usr/local/apache/conf/userdata/std/2/dauwin/dauwin.gr/*.conf"
     
    </VirtualHost>
    Your superhost.gr domain is setup to use the following
    Code:
    <VirtualHost 82.211.30.133:82>
        ServerName superhost.gr
        ServerAlias www.superhost.gr
        DocumentRoot /home/nikos/public_html
        ServerAdmin support@superhost.gr
        UseCanonicalName Off
        CustomLog /usr/local/apache/domlogs/superhost.gr combined
        CustomLog /usr/local/apache/domlogs/superhost.gr-bytes_log "%{%s}t %I .\n%{%s}t %O ."
        ## User nikos # Needed for Cpanel::ApacheConf
        UserDir enabled nikos
        <IfModule mod_suphp.c>
            suPHP_UserGroup nikos nikos
        </IfModule>
        <IfModule !mod_disable_suexec.c>
            <IfModule !mod_ruid2.c>
                SuexecUserGroup nikos nikos
            </IfModule>
        </IfModule>
        <IfModule mod_ruid2.c>
            RMode config
            RUidGid nikos nikos
        </IfModule>
        ScriptAlias /cgi-bin/ /home/nikos/public_html/cgi-bin/
     
     
        # To customize this VirtualHost use an include file at the following location
        # Include "/usr/local/apache/conf/userdata/std/2/nikos/superhost.gr/*.conf"
     
    </VirtualHost>
    So, if you want to access the dauwin folder, you need to use the dauwin.gr domainname.
  26. #29
  27. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2003
    Location
    Thessaloniki
    Posts
    1,280
    Rep Power
    13
    Good day DonR,

    Yes, if we in fact we have registered the domain "dauwin.gr" there would be no problem, since all web urls would be translated into correct file paths.

    But see, we didn't buy dauwin.gr domain and all we have to access the dauwin website is http://superhost.gr/~dauwwin way to do it.

    Please tell me there is still some possible way for when:

    'http://superhost.gr/~dauwin' is being browsed for the '/home/dauwin/public_html' to be associated with.

    So, now what can be done?
    Last edited by Nik; June 14th, 2013 at 02:41 AM.
    What is now proved was once only imagined!
  28. #30
  29. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2003
    Location
    Thessaloniki
    Posts
    1,280
    Rep Power
    13
    Is there some directives i nto the httpd.conf that will for a fact seperate

    http://superhost.gr requests from http://superhost.gr/~dauwin requests?

    requinix?
    What is now proved was once only imagined!

IMN logo majestic logo threadwatch logo seochat tools logo