I want to visit drupal site through 'Local area network'.

For example, my server ip address is, My drupal site is http://daxuebao.local:8083/

I try to use, But can not be visited.

  • Try reading the site via without /daxuebao or /daxuebao.local. Verify that's firewall allows connections on port 8083. – drupwell Mar 9 '14 at 9:37
  • Not work, When I open, It show me a drupal site with Access denied (I never create) – TangMonk Mar 9 '14 at 10:37

Ok, i get it. I installed Acquia Dev Desktop and tried it out. This is what I think is what has happened and what the problem is:

You installed Acquia Dev Desktop and entered parameters about the default site that comes with Acquia (this is required during installation - so this must have happened). This site is what you reach when you from another computer enter

You created the daxuebao site via Acquia Dev Desktop application and entered "Sitename" as daxueabao and you did not enter a "URL Path" so the result is that "Site Path" then becomes "daxuebao.localhost:8083". This means that the Apache software in Acquia Dev Desktop will examine every request it receives and determine if it should go to (a) the default site or (b) the daxuebao site.

The problem is that the daxuebao site is local and that your client computers on the LAN does not know where "daxuebao.localhost:8083" points... the have no knowledge of what IP number that corresponds to and if you enter just the Apache software will determine that to be a request for the default site. The only site that is not local is the default site.

There are basically 3 different ways of solving this problem (which one depends on your need):

Solution 1: add a DNS record to the local DNS if you have one (I don't think you do) or

Solution 2: add a DNS record to the hosts file of all of your client computers (see more at www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/ ) or

Solution 3: move site duxuebao to the default site so that Apache servers that codebase and data instead. Make sure you backup files and database before you do it. I can tell you exactly how to do it if you tell me what operating system you are using.

Added in response to comments: I would do it like this:

Oh, by the way. Acquia Dev Desktop works out of the box on port 8082 and not 8083, just to be sure here, you're not working with multiple installations of Acquia Dev Desktop? If not then:

1 Backup the daxuebao site:

1.1 Open the Acquia Dev Desktop control panel

1.2 Click the Settings button

1.3 Click the Sites tab

1.4 Highlight the daxuebao site

1.5 Click Export button, select "to file"-option to download a copy to your Desktop.

1.6 Backup done (files and data)

2 Backup the default site:

Note: Do this just to be sure.

2.1 Open the Acquia Dev Desktop control panel

2.2 Click the Settings button

2.3 Click the Sites tab

2.4 Highlight the localhost site

2.5 Click Export button, select "to file"-option to download the export to somewhere.

3 Replace the default site FILES with the daxuebao site FILES:

We cannot use the Acquia Dev Desktop import feature here unfortunately because the default site is reserverd/protected. We need to do the copying manually of files (step 3) and data (step 4):

3.1 Stop servers in Acquia Dev Desktop from it's control panel

3.2 Delete all files in /Users/YOUR-COMPUTER-USER-NAME/Sites/acquia-drupal/sites/default

3.3 Copy all files in /Users/YOUR-COMPUTER-USER-NAME/Sites/acquia-drupal/sites/daxuebao.localhost to /Users/YOUR-COMPUTER-USER-NAME/Sites/acquia-drupal/sites/default

3.4 Start servers in Acquia Dev Desktop from it's control panel

3.5 File copy complete.

4 Replace the default site DATA with the daxuebao site DATA:

Both sites default site and daxuebao are now using the same database. That's not good because if you delete the daxuebao site then the data will disappear. So we need to copy the data from database daxuebao to the acquia default database.

4.1 Extract the files downloaded int step 1.5 on the desktop ( it will extract to /Users/YOUR-COMPUTER-USER-NAME/Desktop/daxuebao.localhost ). This folder contains data and files.

4.2 Go to the In the Acquia Dev Desktop controlpanel click button "Manage my database" and a browserwindows with phpMyAdmin will appear.

4.3 Select the database acquia_drupal in left part of the window. In the right part of the window all tables in the database will appear.

4.4 Go to the bottom of the page in the right part of the window and select "check all" and

4.5 delete the tables by using the dropdown to the immediate right labeled "With selected:" and select "Drop".

4.6 Confirm deletion.

4.7 Now, we're going to import the data from the daxuebao site

4.8 Click on the tab "Import" at the top of the right hand window.

4.9 Click button "Choose file".

4.10 Navigate and select the datafile daxuebao.sql thats in the /Users/YOUR-COMPUTER-USER-NAME/Desktop/daxuebao.localhost directory.

4.11 Click button "Go"

4.12 Data copy complete.

5 Change settings-file for default site to look at correct database table

5.1 Open settings.php in /Users/YOUR-COMPUTER-USER-NAME/Sites/acquia-drupal/sites/default directory

5.2 Change $base_url = 'http://daxuebao.localhost:8082'; to $base_url = 'http://localhost:8082';

5.3 Change $db_url = 'mysqli://drupaluser@'; to $db_url = 'mysqli://drupaluser@';

5.4 Change 'database' => 'daxuebao', to 'database' => 'acquia_drupal',

5.5 Verify by going to the site from your local computer

5.6 Verify by going to from another computer within the LAN

5.7 If all looks fine then your default site in Acquia Dev Desktop is now using it's own database "acquia_drupal". You can now safeley delete the daxuebao site from your Acquia Dev Desktop controlpanel.

BR / Fredrik

  • thanks for your reply, This above solution about DNS seems bother. I am using MAC, I hope you tell me how to fix that problem with solution 3, thanks. – TangMonk Mar 9 '14 at 13:49
  • Thanks, I try your step, It works. But too bother. I already switched to MAMP, although it is pretty slow. – TangMonk Mar 10 '14 at 1:31
  • @Wooden Ok. Yes MAMP is pretty slow with Druapal but there are 2 "tricks" 1. add the following to the htaccess-file in your Drupal installation: php_value memory_limit 128M php_value upload_max_filesize 32M php_value post_max_size 32M php_value max_input_time 300 php_value max_execution_time 300 php_value realpath_cache_size 24M 2. Use APC cache and PHP 5.4.10. BR / Fredrik – drupwell Mar 10 '14 at 15:59
  • I am used to use PHP 5.5.3 in MAMP, Now I switch to PHP 5.4.19. Does APC can be used as a production environment? – TangMonk Mar 11 '14 at 1:13
  • I use PHP 5.5 in production environments with OP Cache that comes with PHP 5.5 since I experience it as faster. – drupwell Mar 11 '14 at 6:22

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