Jump to content

Change Port Apache Virtual Server


Recommended Posts

Hey,

Just trying to change the port that Phpmyadmin runs on so that I can block it from my firewall.

currently it is running on port 80 and I want to change it to something else. I'm running Ubuntu server and I found the Apache Files to be under /etc/phpmyadmin/apache.conf. In here I tried to add a Virtual server and it appears to be working on the specified port yet it still works on port 80.

# phpMyAdmin default Apache configuration

listen 8050

Alias /phpmyadmin /usr/share/phpmyadmin

NameVirtualHost *:8050

<VirtualHost *:8050>

<Directory /usr/share/phpmyadmin>

Options Indexes FollowSymLinks

DirectoryIndex index.php

<IfModule mod_php5.c>

AddType application/x-httpd-php .php

php_flag magic_quotes_gpc Off

php_flag track_vars On

php_flag register_globals Off

php_value include_path .

</IfModule>

</Directory>

</VirtualHost>

# Authorize for setup

<Directory /usr/share/phpmyadmin/setup>

<IfModule mod_authn_file.c>

AuthType Basic

AuthName "phpMyAdmin Setup"

AuthUserFile /etc/phpmyadmin/htpasswd.setup

</IfModule>

Require valid-user

</Directory>

# Disallow web access to directories that don't need it

<Directory /usr/share/phpmyadmin/libraries>

Order Deny,Allow

Deny from All

</Directory>

<Directory /usr/share/phpmyadmin/setup/lib>

Order Deny,Allow

Deny from All

</Directory>

Thanks

Defyer

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...