Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have Apache, PHP, and MySQL installed on CentOS 6.4

I can access the server using PuTTY using SSH from another PC on my LAN.

I just installed webmin using yum with the webmin repos, and installed phpMyAdmin using yum using the epel repos.

I can access webmin directly from my server using using both http://localhost:10000 and http://192.168.0.1:10000, but cannot access it from another PC on my LAN:

I can access phpMyAdmin using http://localhost:10000 directly from my server but not by another PC on my LAN, and when accessing it as http://192.168.0.1/phpmyadmin, I get Forbidden, You don't have permision to access /phpmyadmin on this server. Apache/2.2.15 (CentOS) Server at 192.168.0.108 Port 80.

I thought in the past, I used to access webmin using https, not http.

Any suggestions how I should fix? Thanks

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

First off, if you're running both Webmin and PHPMyAdmin on port 10000, you shouldn't. But, last I checked, PHPMyAdmin itself does not bind directly to an interface.

For PHPMyAdmin, you can just use an apache configuration file like any other. This one will for example run PHPMyAdmin through a subdomain and forces SSL use:

<VirtualHost *:80>
    ServerName phpmyadmin.example.tld
    Redirect permanent / https://phpmyadmin.example.tld/
</VirtualHost>

<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerAdmin hostmaster@example.tld
        ServerName phpmyadmin.example.tld

        DocumentRoot /path/to/phpmyamin

        <Directory />
            Options FollowSymlinks
            AllowOverride None
        </Directory>

        <Directory /path/to/phpmyadmin>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            Allow from all
        </Directory>

        <Directory /path/to/phpmyadmin/libraries>
            Order Deny,Allow
            Deny from All
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        LogLevel warn

        CustomLog \
            ${APACHE_LOG_DIR}/access.log combined

        SSLEngine on
        SSLCertificateFile \
            /etc/ssl/certs/yourcertificate.crt
        SSLCertificateKeyFile \
            /etc/ssl/private/yourprivatekey.key
        SSLVerifyClient none
        SSLOptions +StrictRequire

        BrowserMatch "MSIE [2-6]" \
            nokeepalive ssl-unclean-shutdown \
                downgrade-1.0 force-response-1.0
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

        SSLProtocol -all +TLSv1 +SSLv3
        SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM
        SSLProxyEngine off

        <IfModule mime.c>
            AddType application/x-509-ca-cert .crt
            AddType application/x-pkcs7-crl .crl
        </IfModule>
    </VirtualHost>
</IfModule>

Or configure the vhost that PHPMyAdmin runs on to use SSL properly.

To use HTTPS along with ProxyPass (in the case of Webmin) the same applies, but add the following to serve it over port 443:

<IfModule mod_proxy.c>
    ProxyVia On
    ProxyRequests Off
    ProxyPass / https://webmin.example.tld:10000/
    ProxyPassReverse / https://webmin.example.tld:10000/
    ProxyPreserveHost on
    <Proxy *>
        Options FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Proxy>
</IfModule>
share|improve this answer
add comment

You should find a guide on setting up Apache for the first time, such as: http://httpd.apache.org/docs/2.2/install.html

It sounds like you've missed something in the configuration file.

share|improve this answer
    
Several days ago, I followed this document, and installed Apache from source. I also installed PHP from source per their documentation, and MySQL from binaries without going through the distributors repo. When I told others what I did, they all said "why?", and that I should always install per the package manager when available (in my case, yum). I have since started over. Do you install Apache from source? You think it is the best way to do so? –  user1032531 Jun 20 '13 at 18:50
    
I would definitely install everything possible from repositories, it will be a lot easier and more consistent. If you can, remove all of the programs you installed from source, and start over installing them from the repos. It's much faster, you just run "yum install <package name>" for each program you want to install. –  WildVelociraptor Jun 20 '13 at 20:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.