MyBB Community Forums

Full Version: Wamp installation give error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I try to install my live website on localhost with the help of swamp but it give following error.

"This site can’t be reachedlocalhost refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED.


I done as following.

1. Installed Wamp

2. Download home directory form cpanel.

3. In my live website panel, I click on phpmyadmin and download database.

4. Created mybb folder in c://wamp64/www/mybb

5. Copy and paste all data which are inside public_html folder into c://wamp64/www/mybb

6. Through toolbar---> left click on swamp icon-----> click on phpmyadmin ----> open local host phpmyadmin ----> add username "root" and password keep blank and server choice as mysql----> Go
It will open phpmyadmin.

8. Clicked on user account and created user with same username and password  as on live website database. (from inc/config.php file)

User name:  Use text field:  username as in my database

Host name: Local : localhost
Password : same as in my database

In Database for user account
Ticked - Create database with same name and grant all privileges.
Ticked - Grant all privileges on wildcard name (username\_%).
Global privilege: Checked all
Clicked Go
So user created  with same name of database as user.

9. Now go to database and click on above point no. 8 created database and install downloaded database copy.

10. Change username in inc/config.php file as here I created database having name same as username.

11. Do changes in /setting.php file as below
/inc/settings.php:
$settings['cookiedomain'] = "";
$settings['cookiepath'] = "https://localhost/mybb/";
$settings['cookieprefix'] = "";
$settings['homeurl'] = "https://localhost/mybb";
$settings['bburl'] = "https://localhost/mybb"; 


12. NOW When I try o open https://localhost/mybb it give above error. I am not able to open my website on localhost.

Please guide me for solve this iisue.

Thank you.
Wamp ? Try with http, not https.

And your settings.php is false, cookiepath must be a path (use "/mybb").
BTW, you don't have to edit settings.php : when your mybb will work, go to ACP, Board settings, check & save. settings.php will be redoed.
I did as you mention.. Still not working.
It download index.php file everytime when I paste http://localhost/mybb

and on https://localhost/mybb it give error " This site can’t be reachedlocalhost refused to connect."
It was probably caused by misconfiguration of WampServer or system firewall, not MyBB itself.

Please check if WampServer successfully listens on port 80/http or 443/https and if port 80/443 is not blocked by firewall.

If the browser was downloading the PHP file instead of showing it, maybe PHP is not correctly configured for WampServer.
Where to check for port? In which file?

How to see whether PHP properly configured for wampServer?
Please guide.

When i open 127.0.0.1. ...It open localhost page.
(2020-06-12, 05:09 PM)Dr_The_One Wrote: [ -> ]Where to check for port? In which file?

How to see whether PHP properly configured for wampServer?
Please guide.

When i open 127.0.0.1. ...It open localhost page.

I run mybb forum for 3 years on wampserver and i suggest to you to use HTTPS as it makes Mybb more secure.
There are a few steps to make it work over port 443 example you need to allow it through windows firewall and port forward  443 on router and you also need to have a ssl certificate and configure the cert keys within wamp.
To configure SSL with wampserver using  letsencrypt follow this video https://www.youtube.com/watch?v=kO-4SEYNhTs
i have https through lenscrypt.

If any give steps to change port than I will be very thankful.
I am tired by doing so many experiments to work wampserver.
(2020-06-12, 08:41 PM)Dr_The_One Wrote: [ -> ]i have https through lenscrypt.

If any give steps to change port than I will be very thankful.
I am tired by doing so many experiments to work wampserver.


It's so easy once you learn how everything connects ... it took me about 1 year to learn how to use wamp because this was many years ago and at the time nobody had videos on wampserver so i had to learn everything by scratch. Now theres so many tutorials on youtube you can have it up and running within an hour.

Also did you do something similar to this below? You need to configure this part correctly or it won't connect.


Edit Your httpd-ssl.conf File
Open c:/wamp64/bin/apache/apache2.4.41/conf/extra/httpd-ssl.conf and change all the parameters to the ones shown below. Make sure to enable ssl_module in apache

<VirtualHost *:443>
	ServerName What Ever Name You Want
    DocumentRoot "C:/wamp/www/folder"
    ServerAdmin [email protected]
	ErrorLog "C:/wamp/bin/apache/apache2.4.41/logs/ssl_error.log"
	TransferLog "C:/wamp/bin/apache/apache2.4.41/logs/ssl_access.log"
	SSLEngine on
	SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
	SSLCertificateFile      "C:/wamp/bin/apache/apache2.4.41/conf/key/certificate.crt"
	SSLCertificateKeyFile   "C:/wamp/bin/apache/apache2.4.41/conf/key/private.key"
	SSLCACertificateFile    "C:/wamp/bin/apache/apache2.4.41/conf/key/origin-pull-ca.pem"
#
	SSLVerifyClient none
	SSLVerifyDepth  10

	<Directory "C:/wamp/www/folder/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride all
	</Directory>
	<FilesMatch "\.(cgi|shtml|phtml|php)$">
		SSLOptions +StdEnvVars
	</FilesMatch>

	BrowserMatch "MSIE [2-5]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
	CustomLog "C:/wamp/bin/apache/apache2.4.41/logs/custom.log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>

Also click on the wampserver icon go to apache and then open up httpd.conf and edit



Find this
<Directory "${INSTALL_DIR}/www/">


Replace everything between 

<Directory "${INSTALL_DIR}/www/">  .....   </Directory>


with this

<Directory "${INSTALL_DIR}/www/">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options +Indexes +FollowSymLinks +Multiviews

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride all

    #
    # Controls who can get stuff from this server.
    #
#   Don't modify this line - Instead modify Require of VirtualHost in httpd-vhost.conf
    Require all granted
</Directory>
After install wampserver i see below part in localhost. Mybb is not clickable. It just text.

[attachment=42987]

Anything need to be configured before creating database and user?
Please guide.
wamp Wrote:You must declare declare them as VirtualHost

Edit httpd.conf (or whatever the file is named) and add a vhost block for mybb.
Pages: 1 2