How to make webdirector a local server. Local server, create a local server, configure a local server


Creating your own local server based on a regular personal computer– the task is quite complex and painstaking. Here you need to understand the following points:

  1. 1. , and whether you even need your own server. This is one of the key questions that requires a clear and unambiguous answer from the future administrator.
  2. 2. What technical resources are at your disposal, and what will be necessary for the operation of a full-fledged server. The minimum technical requirements for creating a “high-quality” server are quite high: the equipment alone will cost 70 - 80 thousand rubles.

Also note that for normal operation resource (for which you plan to make your own server), you need the server computer to be constantly on and work without interruptions. Therefore, it is necessary to ensure an appropriate power supply.

3. What cash you are willing to spend on creating and maintaining the server. In addition to the above-mentioned hardware costs, to create a full-fledged server on a computer, you need a dedicated (statistical) IP address and high speed data reception and transmission (the minimum value is 10 Mbit/sec). Accordingly, you will have to pay extra for this to the provider and conclude additional agreement to provide this type of service.

And before you try to make a server out of a computer, you need to clearly define all these nuances.

How to make a server from a home computer?

To create your own server, you first need to install a multi-user network operating system.

The choice is huge: Debian, FreeBSD, CentOS, OpenSUSE, Ubuntu, Windows and many others.

On the Internet you can find many examples of testing in the operation of the above-mentioned operating systems and their ratings in accordance with the test results. For example, the “SOS” rating for 2016:

1st place: “Debian” and “Ubuntu Server”;

3rd place: “FreeBSD” and “ Windows Server»;

4th place: “Red Hat Enterprise”;

5th place: “Fedora”.

Of course, the lion's share of the network software market is made up of operating systems that occupy first place in the ranking. Therefore, in order to create a server on a computer for the first time, we recommend choosing one of them.

As an example, we will focus on installing the Ubuntu Server operating system.

How to set up a local server from scratch on ubuntu?

1. Download and upload the operating system image to bootable USB flash drive. Boot your computer from the flash drive: at the first stage you will be asked to select a language.

3. In the next steps, select "Region" and "Keyboard Layout Settings";

4. Specify your username, computer account and password,

then click “Continue”;

configure “Disk Layout”

and select which disk the system is installed on;

6. Wait for the installation and system update to complete.

7. Select the software you need to get started.

8. Confirm that the installation is complete by clicking on the “Continue” button;

9. After restarting the computer, to log into your account you will need to enter the username and password created in step “4”;

10. This completes the installation of the server operating system and the initial creation of the server.

How to make yourself an admin on your server?

  1. 1. To obtain administrator rights, enter the command “sudo su”;
  2. 2. Default network settings servers are accessed using DHCP, but for the server to work you will need to change the value “iface eth0 inet static” in the file “/etc/network/interfaces” to “static IP address”. The text should look something like this:

iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

After saving, restart the network with the command “/etc/init.d/networking restart”.

How to create a local server on a computer? This question primarily concerns those who decided to create their own website and decided to install a local server in order to test it. But what is still needed for installation and why is it needed in general?

A local server is a program that allows you to develop a website directly on your computer. It differs from hosting in that a site on a local server is accessible only where it is directly installed.

This work is carried out with the aim of checking the functionality of the future site, so that in the future there will be no unexpected problems with the hosting.

There are several programs that allow you to install a local server. However, for the most part, the installation process is the same for everyone. Therefore, as an example, let’s consider “Denver” - a local server that is very popular in Russia, due to the fact that its creator is Russian and because it is very easy to use.

Such servers contain all the necessary files for work - Apache, PHP, MySQL, Perl, etc.., which means you only need to download the package itself.

Then proceed with the installation, after which everything should work correctly, which, for example, cannot be said about servers on the network where something is constantly not working. Therefore, this is certainly the main convenience of a local server.

How to create a local server on a computer in Denwer

In order to create a local server, first of all, you need to download the set necessary files. To do this, you need to go to the Denver website (//www.denwer.ru/). It looks like this:

Then click on the “DOWNLOAD” button. We will be asked to choose one of two versions of PHP, choose the newest one. Then, a new window will open where you will need to provide your contact information - first name, last name and email. Next, you will receive a link to download Denver by email.

We wait a few minutes and download the program files to your computer using the link you received at the previously specified email address.

Step 2. How to install a local server

After the download is complete, run the installer. Click yes and the unpacking will begin. Then we just follow the instructions.

However, when you press Enter keys You may or may not encounter an "Access Denied" error. But, despite this, we still press Enter and continue the installation.

You can use a non-system drive C as the installation location, so that if another version of the operating system is installed, all data will be preserved.

During the installation process, the installer will ask you to select the letter Z as the installation location. If it is not busy, then you can select it; otherwise, select another letter, for example, D. Next, three shortcuts are created on the desktop.

The browser in a new window writes that “Denver” is installed, and also provides a list possible errors problems that may arise when starting and working with a local server.

For example, this is blocked by the NOD32 virus in Windows XP. Another problem is the most common and is associated with a conflict in Skype. By default, both programs use port 80, so if the program does not work, you need to disable the use of the port in Skype. To do this, go to tools > connection problems > uncheck the use of port 80 and 443 > then save and the problem should be solved.

In order to make sure that everything works, you need to enter the localhost address bar. But some browsers use this string as a search. Therefore, for the first time it is better to enter the full address - //localhost. If everything worked, you should see a page like this:

At this point, the installation of the local server is complete, all that remains is to create a website on it and bring it to perfection, and then transfer it to hosting.

Having learned how to create a local network server, it may be quite logical question: "What's next?". To answer this you need to understand why, in general, a person needs a local server. If he just wants to practice creating websites and improve his skill level, then he should start learning languages hypertext markup and style sheets.

If he needed to create a local server in order to test the existing site before directly uploading it to the network, then he should first install it on the local server. Ask: “How to do this?” More on this below.

Landing a site on a local server

A local server on your computer performs the same functions as a website on the network. The only difference between them is availability. After all, a local server installed on your computer will be accessible only to you, while the hosting site will be visible to everyone. Therefore, in order to avoid negative criticism from angry site users, all errors should be eliminated locally.

A website is a collection of web pages that are written in HTML, CSS and Javascript. These development tools can be used without the help of a local server and therefore site development begins with them. PHP, in turn, can be used on a server (any server); it is necessary for the site to be dynamic.

That is, if it were necessary to change information on all pages of the site, then there would be no need to go into each file and change something.

It would be enough to do it in one. However, at the beginning of development, the site is static, but this does not matter, because there you need to create only those pages that will differ from each other. Usually this is the main page, subsection and article page. Subsequently, you can add a feedback form, registration page and forum.

However, it will be much more convenient to create a website directly on a local server in order to use all the functions to the maximum from the very beginning. To do this, go to My Computer and see the disk that “Denver” created.

We go into the disk, go to the home folder and create a new folder and write the site address as the name. Next, you need to create a www folder inside. And directly in it we create a text file with the html extension (for example, index.html). To check whether it is displayed correctly, click on it right click mouse and select open using notepad (or any other editor - Sublime text, Notepad, etc.). Inside the file we will write the standard “Hello world!” program. It looks like this:

Then we save and restart Denver by clicking on the Restart Denwer shortcut so that all the changes made take effect. However, if we now try to go to our website, which has the same name as the folder created in the Denver drive, we will not see anything. Because the local server conflicts with the hosts file. It is located here C:\WINDOWS\system32\drivers\etc\hosts.

The hosts file allows you to identify specific website addresses with a specific IP address. For example, our local machine is 127.0.0.1 www.localhost. When we type any site in the browser line, the first thing we do is check this site and go to the address on the left. If the transition to our local site does not work, this means that its address is not registered in the hosts file. This is often caused by an antivirus that blocks access.

To solve this problem, you need to go to the antivirus and select the settings section. There you need to find the “threats and exceptions” category > click the “setup” button and select our folder that we created in “Denver”. Next, save all the changes made and click ok.

Of course, this problem may not arise for everyone. Usually it occurs due to the characteristics of a particular antivirus. Now, after going to the local site, the following message should appear on the screen: “Hello world!”

If we want our site to work at localhost, then we just need to go to the localhost folder on Denver, go to www and also create html file.

Denver users often have problems sending emails. The fact is that Denver doesn’t actually send letters, it only generates them and stores them in the folder:

tmp > !sendmail. In that folder there will be letters in the form of regular text files. So, if they are sent on a local server, then there will be no problems on the real one.

Thus, we can say that a local server is an excellent platform for website development, which is suitable for both beginners and professionals. Because installation does not require any special knowledge and skills, it is enough just to be familiar with a computer and be able to use application programs.

Plus, it should be noted that the local server cannot be seen from the Internet. The only thing you can do is open access to your home network, provided that all computers are in your home and share a common network connection. But usually such questions do not concern ordinary users.

Much more important points for them are directly related to the possible costs of maintaining the site. For example, payment for hosting and domain. However, there is clearly no need to worry about this, because purchasing a domain costs about a thousand a year, and you can find hosting for the same amount. Is this really such a big expense that you can’t go to make the site accessible to the masses and everyone can see what has been created for more than one month, or even a year?

If such arguments still do not convince a person, then at first you can use demon paid hosting, but it limits the user's actions. For example, you cannot sell advertising from the site in any form, but as you know, this is the main source of income for a web resource. So, when the site administrator sees that the visitors are still there, demanding bread and circuses, and he receives absolutely nothing for his work, then the transition to paid hosting will happen at once.

Perhaps, after reading this article, every user has learned something new for himself, and now if he is asked: “How to create a local server?”, he will confidently tell everything that he found out here. In order not to miss my next, no less interesting article, I strongly recommend subscribe to rss feed my blog.

Well, how do you like the article? Did you like it? Maybe you want to add to it or ask me to write something worthwhile next time? Feel free to write about it in your comments.

On this note, I conclude this article, and I would like to take this opportunity to congratulate everyone on the upcoming New Year 2017! May the coming year be better than the last! Health and good luck!

Local server– a web developer tool for creating, debugging and testing various scripts and web applications. In other words local web server this is an emulator real server hosting provider located on your computer. The operation of a local server is no different from the real one, and we can create and test our websites on it.

I won't go too deep into how a local server works and what it consists of. We'll talk about this in another article. In this article we will analyze installation and configuration of a local server to your computer, but first we’ll figure out which local server to choose.

Today there are many local servers, but which one to choose?

For a long time I used the Denver gentleman's kit, which includes php, MySql databases and PhpMyAdmin. You can find out more about this package on the official website of the developer. Denver is one of the popular local server packages for web developers.

But I had to give up Denver when I discovered Open Server. In my opinion, this application is much more convenient to work with, especially since in the latest versions the developer has included a large number of necessary programs, necessary for a webmaster: browsers, code editor, file manager and more.

Distributed by Open Server absolutely free. The only thing you can do is thank the author for such a super useful product for webmasters by transferring an arbitrary amount to an electronic wallet. As the author says, donations are very important, because the project is not commercial. Well, that’s understandable, you can’t live without money today... In general, I personally transferred as much as I didn’t mind.

Benefits of Open Server

What can I highlight in favor of this server? In general, I can say a lot of good things about Open Server, but I’m afraid the article will be too long. Therefore, I will highlight the important points.

The product comes in 3 versions: Ultimate, Premium, Basic. In general, you can see the differences on the developer’s website, but I took a screenshot and attached it to the article.

I consider the presence of several versions to be a plus, because... You can download exactly what you need. Pay attention to the Ultimate version when unpacked - more than 5 GB. I personally constantly have problems with free space on my hard drive. If you don’t have any problems with this and need additional modules and programs, you can safely download Ultimate.

Availability free programs , as already noted. What programs exactly? I took a screenshot again.

The list, as we see, is impressive.

Private program update. In fact, this is also very important. With each new version, bugs are fixed and new features appear.

Portable version of the program. The program essentially works without installation. You can carry it on a flash drive and, if necessary, work on another computer.

Rich program capabilities. Below I have inserted a screenshot of the Open Server settings window. Looking at this screen, you will understand that this server contains everything that a webmaster may need when developing a website. FTP server, working with mail (php mail, smtp mail), aliases (for), domains (creating an additional domain alias), task scheduler (though I haven’t used it yet).

Excellent documentation + support forum. The manual was written by the developer and is quite comprehensive. Moreover, you can ask any questions you have on the support forum. In general, there is everything to get started. You just need to pay a little attention to understand all this.

I’ll finish with the advantages for now, but this is not the entire list. You can find out more about Open Server on the developer’s official website - http://open-server.ru.

Installing a local Open Server

First, we need to download the distribution from the developer’s website. It's up to you to decide which version to download. This does not affect the operation of the local server in any way. The distribution is a self-extracting archive. Double-click to unpack the archive somewhere on HDD computer, but generally preferably to the root of the hard drive. That's it, you can start the program. Now go to the folder where you unpacked open-server and immediately create a shortcut on your desktop for the main boot file. You will find two versions of the boot file - one is designed for a 32-bit operating system (Open Server x86.exe), the second for a 64-bit operating system (Open Server x64.exe). We create a shortcut according to your system. For example, I chose "Open Server x64.exe" because... I have a 64-bit OS. To create a shortcut, right-click on the file, then Send -> Desktop (create shortcut).

When you first launch the program, you will be asked to select a language and then a dialog box will pop up in which you will be asked to install Microsoft Visual C++ Runtime & Patches if you are running Open Server on this computer first time.

To be honest, I don’t even know why this needs to be installed, previous versions This was not the case with Open Server. But I installed it and advise you.

You can start Open Server by clicking double click by the shortcut that we sent to the desktop. After launch, a red flag will appear in your tray (next to the clock), this will mean that the local server program is running, but the server itself is not activated. Before activating, let's first look at the settings.

The first thing we need to do is to ensure that the local server starts when the application starts (in principle, this is at your discretion). To do this, in the settings, in the “Basic” tab, check the “Server autostart” checkbox.

In the " Modules" you can see installed modules for a local server and can be changed if desired. For example, by default php version 5.5 is used. If you need 5.6.xx or php-7, you can easily change by selecting the required version from the drop-down list.

Also in the tab " Server"I advise you to select the option " Always use virtual. disk". This is necessary so that a virtual disk is created when the server starts. You can choose any drive letter.

I recommend leaving the rest of the settings as they are. If you messed something up with the settings, you can always roll them back to factory settings by clicking on the " Reset settings«.

Now you can start the server - click on the red flag icon in the tray (one click with the left mouse button is enough) and select the green flag in the program menu. What do the colors of these flags mean?

  • Green - the server is running;
  • Orange - the server is starting/stopping;
  • Red—server is stopped.

After startup, you should have a virtual disk - W (unless, of course, you specified a different label in the settings). I would like to note that when you first start, you may be asked for approval by the Windows Firewall if you have it enabled. The approval window may pop up several times and all the time we give the go-ahead to the firewall to perform actions by the Open Server. Otherwise, your server will not start.

Go to the virtual disk W and in the folder " domains» create a folder for your future project and upload all the files of your site there. There is no need to create a “WWW” folder in the site folder, as is done in Denver. After the files are uploaded, restart the server by clicking on the orange flag so that the server defines a new site folder.

To launch the site after installation, in the Open Server menu go to “ My sites" and in the drop-down list of sites, click on the one you need. After this, the browser that is installed by default in Windows will open - if you are using the simplified version, and if you are using the full version, the browser that is installed in the local server settings will open.

In this article I described how to install a local Open Server server. The list of settings that I went through is far from complete... We’ll talk about other features and settings sometime in another article, but for now I’ll probably end on this note.

Good luck and happy website building!


The architecture of the directory layout of the software package implies a clear separation of two different types of data: dynamic user data (settings, temporary files, logs, etc.) and static data (modules, programs, service files).

In simple terms, in the modules folder no files are ever changed, created or deleted, but in the domains and userdata folders, on the contrary, the data is constantly changing. This architecture was created specifically to simplify data synchronization between different copies of the complex and save space during backup.

Installation and launch

Installation

OSPanel is a portable software package and does not require installation. The assembly can be placed on an external hard drive or flash drive, this will allow you to use OSPanel on any computer that meets the system requirements.

The distribution is a self-extracting archive in 7ZIP format (.exe extension). Run executable file distribution and select the path to unpack the files.

System requirements

  • Required minimum system resources: 200 MB RAM and 1 GB HDD;
  • Windows (32-bit or 64-bit): Windows 8 / Windows 7 / Windows Server 2008 / Windows Vista/Windows XP SP3;
  • Installed set of Microsoft Visual C++ libraries 2005-2008-2010 Redistributable Package x86;

Launch

To launch OSPanel use the file OSPanel.exe. If possible, the program should only be run as an administrator. After starting the program, you will see a red flag in the Windows tray (the area near the system clock). To enable the web server itself, click on the checkbox, then select the menu item [Menu → Start].

If the server does not start, go to the section in this reference guide.

Attention

Before you start using OSPanel, perform [Menu → Advanced → First launch]. Having an installed set of Microsoft Visual C++ 2005-2008-2010 Redistributable Package x86 libraries is a mandatory system requirement; OSPanel will not work without them.

Run from CD/DVD

OSPanel can be launched from CD/DVD disks in the same way as from a regular HDD disk or flash drive, with the only difference being that when working from an optical disk, no changes or files will be saved after exiting the program.

As you know, a CD/DVD disc is available only in read mode, which makes it impossible to launch and use a server on such media in the usual way. OSPanel has a fairly simple mechanism built into it to get out of this situation: when starting, the server is copied to a temporary folder on the computer, and when the program exits, this folder is completely deleted. Thus, all OSPanel work occurs on the user's computer, and not on the optical disk.

Installing updates

OSPanel is a fairly complex software package with a constantly improving architecture. There is no update procedure as such. On exit new version OSPanel needs to re-do all settings, copy your sites folders and transfer databases. Do not unpack distribution files over an existing version, and do not try to copy configuration and profile files from old version programs to a new one! Since new versions of OSPanel can sometimes be released quite frequently, it is not worth updating your build every time, it is better to skip several versions.

If it is possible to update by simply copying files, then a link to the patch is always published in the news on the site along with an annotation for the new version.

Compatibility

Some new OSPanel modules (PHP 5.5, MongoDB, Apache 2.4) are incompatible with outdated operating systems such as Windows XP, Windows 2003, Windows Vista. When using such modules and running the server on legacy systems, you will receive an error message. You should also know that some modules can only work together, for example Apache 2.4 and PHP 5.5.

Connection

Below are the default parameters for connecting to modules in OSPanel. You can always change these settings yourself at your discretion.

Connecting to MySQL

  • Address: your website domain*
  • Port: 3306
  • User: mysql
  • Password: mysql

ROOT connection to MySQL

  • User: root
  • Password: (blank)

Information

The default encoding is MySQL settings server, does not affect the ROOT user. The encoding will need to be explicitly specified in database connection scripts, so using the ROOT user is not recommended.

Connecting to PostgreSQL

  • Address: your website domain*
  • Port: 5432
  • User: postgres
  • Password: (blank)

Connecting to MongoDB

  • Address: your website domain*
  • Port: 27017
  • User: (blank)
  • Password: (blank)

Connecting to Memcache

  • Address: your website domain*
  • Port: 11211
Max. The default memory size used by the Memcache server is 64 MB. This parameter can be changed in the OSPanel settings [Menu → Settings → Miscellaneous].

Connecting to FTP

  • Address: your website domain*
  • Port: 21 (990 for FTPS)
  • User: ftp
  • Password: ftp

Domain localhost

If you want to use the usual localhost address to connect to a MySQL, PostgreSQL, FTP or Memcache server, then just create a standard domain or alias named localhost.

Connection automation

When you work with local copies of existing web projects, difficulties arise with constant editing of configuration files, mainly related to database connection settings. To avoid this it is recommended:
  1. Create a database user locally with the same name, password, and privileges as those used on the remote server.
  2. Create an alias with the same name that is used as the database host on the remote server.
---
* For example, if your script is located at test.server.loc/mysql.php, then the host (address) of the MySQL, PostgreSQL, FTP and Memcache server will be the domain: test.server.loc

Domains and aliases

Domain management modes

OSPanel has three domain list management modes: autosearch, manual management, and manual+autosearch. By default, the first mode is used to automatically connect folders from the root directory specified in the settings.

How does auto search work?

The program scans the specified web directory for the presence of folders with domains, after which each folder found is searched for subfolders (domain root folder) that are specified in the auto-scan settings. If none of the expected root subfolders are found, then the domain folder itself becomes the domain root.

How combined control works (manual + auto search)

When using the combined domain management mode, the program first connects manually created domains, after which it automatically scans according to the procedure described above.

Create a domain automatically

To create a domain or subdomain, open [Menu → Sites folder] and create a folder with the name of the future domain. After creating the domain, restart the server.

Creating a domain manually

To create a domain or subdomain, go to the [Menu → Settings → Domains] section and create an entry like: domain => folder. As a domain folder, you can select an existing folder on the disk or create it directly in the directory selection window. After creating the domain, save the settings.

Creating a Cyrillic domain

OSPanel supports Cyrillic domains, but be careful, the folder with the domain must be named it real name, and not a pseudo name in Cyrillic. For beer.rf, the real name (punycode format) will be xn--b1altb.xn--p1ai and by creating such a domain you will get access to http://pivo.rf. To convert domain names to punycode format and back, use [Menu → Advanced → IDN converter].

Creating a subdomain

The process of creating a subdomain is similar to the procedure for creating a regular domain. When creating only a subdomain, the availability of the main domain existing on the Internet is not lost, i.e. you will be able to work with a local subdomain while having access to a working domain on the Internet.

Creating an alias

To create an alias, go to the [Menu → Settings → Aliases] section and create an entry like: source domain => destination domain. After creating the alias, save the settings.

Please note that creating an alias like *.xxx.xx does not mean that any domains like test.xxx.xx, mail.xxx.xx, etc. will become available to you. You still need to create a specific alias or domain for it to become accessible; this is a feature of the Windows operating system.

Website icon in the domain menu

If there is a correct favicon.ico file in the root folder of the domain, the site icon will be displayed in the program menu.

Limited operation

In some cases, managing domains and aliases is not available (see).

Web tools

You can open the start page with links to domains and a list of tools by adding the /openserver/ prefix to any existing local domain. For example: http://localhost/openserver/

Working with MySQL

Creating a MySQL User

  1. Enter username root without password (default)
  2. In PHPMyAdmin, open the [Privileges] section
  3. Click the [Add new user] link
  4. Fill out the form and click the [Create user] button

Information

If, in addition to other privileges, the user has the SUPER privilege, the encoding set by default in the MySQL server settings will not apply to him. The encoding will need to be specified in your scripts individually for each connection to MySQL, therefore it is not recommended to mark the SUPER privilege.

Creating a MySQL Database

  1. Open [Menu → Advanced → PHPMyAdmin]
  2. Use root to login without password (default)
  3. In PHPMyAdmin, open the [Databases] section
  4. Enter the name of the new database and select its encoding
  5. Click the [Create] button

How to login to PHPMyAdmin / MySQL manager

  1. Open [Menu → Advanced → PHPMyAdmin / MySQL Manager]
  2. Enter username root without password
  3. Click the [Login] button

Specifying the connection encoding to the MySQL server

The cp1251 encoding is Russian, it can be replaced with the name of any encoding you need.

Switching database modules

Be careful when changing the active database module. Each module has its own separate storage of databases and settings; they are not connected with each other in any way, so you will not see the databases you created when switching to another module.

Long connection to MySQL (more than 1 second)

Before you start using OSPanel, you should disable the IPv6 protocol via [Menu → Bookmarks → Registry Fixes → Disable IPv6]. If this is not done, then the connection process will MySQL server can be executed for a very long time (more than 1 sec) and the speed php execution scripts will not please you.

Working with Path

To add your own paths to the PATH environment variable, you can use the file ./userdata/config/path.txt

Paths must be added one by one, each with new line, for example: C:\Windows D:\My Programs %realprogdir%\data\dll C:\Windows\System32

Information

By default, the path.txt file is not included. See [Menu → Settings → Server].

Variable Variable Description
%realprogdir%
%progdir%
%sprogdir%
%dprogdir%
%dsprogdir%
%realsitedir%
%sitedir%
%ssitedir%
%httpport% HTTP port servers
%httpsport% HTTPS server port
%postgresqlport% PostgreSQL server port
%mysqlport% MySQL server port
%mongodbport% MongoDB server port
%memcacheport% Memcache server port
%ftpport% Port FTP server A
%httpdriver% HTTP module name
%phpdriver% PHP module name
%mysql_driver%
%pg_driver% PostgreSQL module name
%mongo_driver% MongoDB module name
%memcachedriver% Memchache module name
%dnsdriver% DNS module name
%ip% Server IP address
%disk%
%osdisk%
%sysdisk%

DNS server

The built-in DNS server is intended for use in local networks or for debugging web applications. For detailed configuration, the general server configuration is available, as well as the domain configuration.

To use the built-in DNS server, you need to configure network interface on each computer BEFORE starting the server itself. You need to configure as follows: local machine, and on other computers on the local network that want to access your domains. Without specifying a local DNS server in the settings network connection starting the server will not be possible (if the DNS module is activated in the OSPanel settings).

By default, the TTL parameter is set to 60 (seconds), you can change this value in the ./userdata/init.ini file, however, be aware that thoughtlessly changing the TTL may cause other computers on your network to cache irrelevant entries. Change this setting only if you truly understand its purpose.

  1. For the server IP address, select the IP address of your computer on the local network or the Internet in the OSPanel settings (do not select the All available IP option).
  2. Open the properties of the desired network connection:

    Network and Sharing Center → Connection xxx → Properties → Internet Protocol Version 4 → Properties → General → Use the following DNS server addresses.

    Enter the following NS server addresses: xxx.xxx.xxx.xxx 8.8.8.8 (or any other real backup DNS) Instead of xxx.xxx.xxx.xxx, enter the IP address of your computer on the local network or the Internet.

  3. Repeat the setup procedure on other computers on the local network.
  4. Do not configure aliases from the instructions in this section of this manual. Similar setup is not required, since remote computers will work directly with your DNS server and will have access to all domains.
  5. Save the settings and launch the OSPanel server.
Once configured correctly, all computers on your local network will be able to access OSPanel domains.

Serving real domains

For service local DNS server of real domains on the Internet, enter into DNS settings for each of the domains the following entry (the parameters domain.ru and ip must be replaced with the domain name and IP address of the server with OSPanel, respectively): # Settings are made in the control panel of the domain registrar company # For DNS based on the registrar servers ns1.domain.ru. 3600 IN A ip # For DNS based on the OSPanelns1.domain.ru server → ip

Task Scheduler

Using the task scheduler (Cron)

Time values ​​are entered as numbers, a combination of numbers, or *.
You can specify times using commas as delimiters: For example: 1,2,3 Result: the task is executed 3 times, at the 1st, 2nd and 3rd minutes of the hour. You can specify a range using a hyphen: For example: 5-7 Result: The task is executed 3 times, at the 5th, 6th and 7th minutes of the hour. You can specify the execution frequency using an asterisk (*) and a slash (/): For example: */2 Result: the task is executed every 2 minutes. You can combine methods to create an accurate schedule: For example: 1,5,11-15,30-59/2 Result: the task runs at 1,5, from 11 to 15 and every 2 minutes from 30 to 59. The above time specification scheme relevant for all time periods (minute, hour, day, month, day of the week). To request a URL in the scheduler, you need to use the Wget helper utility (see examples). You can use substitutions in the command line.

Using Variables as Substitutions

Variable Variable Description
%realprogdir% Real path to the OSPanel folder (backslash "\")
%progdir% Generated path to the OSPanel folder, taking into account the virtual disk (backslash "\")
%sprogdir% Generated path to the OSPanel folder, taking into account the virtual disk (slash "/")
%dprogdir% Generated path to the OSPanel folder, taking into account the virtual disk (double backslash "\\")
%dsprogdir% Generated path to the OSPanel folder, taking into account the virtual disk (double slash "//")
%realsitedir% Real path to the root domain folder (backslash "\")
%sitedir% Generated path to the root folder of domains, taking into account the virtual disk (backslash "\")
%ssitedir% Generated path to the root folder of domains, taking into account the virtual disk (slash "/")
%httpport% HTTP server port
%httpsport% HTTPS server port
%postgresqlport% PostgreSQL server port
%mysqlport% MySQL server port
%mongodbport% MongoDB server port
%memcacheport% Memcache server port
%ftpport% FTP server port
%httpdriver% HTTP module name
%phpdriver% PHP module name
%mysql_driver% MySQL/MariaDB module name
%pg_driver% PostgreSQL module name
%mongo_driver% MongoDB module name
%memcachedriver% Memchache module name
%dnsdriver% DNS module name
%ip% Server IP address
%disk% Drive letter from the generated path to the OSPanel folder, taking into account the virtual disk (letter only)
%osdisk% Drive letter from the real path to the OSPanel folder (letter only)
%sysdisk% System Windows disk(letter only)

Example of a scheduled task (requesting a cron.php file via HTTP and saving the response to a temporary file to prevent garbage from accumulating): Time: */30 * * * * Execute: %progdir%\modules\wget\bin\wget.exe -q - -no-cache http://xxx.ru/cron.php -O %progdir%\userdata\temp\temp.txt Example of a scheduled task (requesting the cron.php file via HTTPS and saving the response to a temporary file to prevent garbage from accumulating) : Time: */30 * * * * Execute: %progdir%\modules\wget\bin\wget.exe --secure-protocol=TLSv1 --no-check-certificate -q --no-cache https:// xxx.ru/cron.php -O %progdir%\userdata\temp\temp.txt Example of a scheduled task (execution of cron.php by the PHP interpreter): Time: */30 * * * * Execute: %progdir%\modules\php \%phpdriver%\php-win.exe -c %progdir%\modules\php\%phpdriver%\php.ini -q -f %sitedir%\xxx.ru\cron.php

Predefined Scheduler Variables

In addition, any environment variables, such as %COMSPEC%, can be used as scheduler variables.

Call the command interpreter to execute the command: Time: 0 * * * * Execute: %COMSPEC% /c del /S /Q c:\temp\* Variable %COMSPEC% in this case it will be expanded to C:\Windows\system32\cmd.exe

Job Scheduler Features

It is very important to understand that the task scheduler (cron) is not a command line or console. The scheduler only launches the program with the parameters specified in the task. Thus, those programs that can only run in the console must also be launched through the console in the scheduler itself.

For example, such a task will not be completed ( incorrect entry ): %realprogdir%\modules\database\%mysql_driver%\bin\mysqldump.exe -A -a --add-drop-database --opt --host=%ip% --user=root > %realprogdir%\ %DD%_%MM%_%YYYY%_%hh%_%mm%_dump.sql Now look at correct option job entries: %COMSPEC% /c %realprogdir%\modules\database\%mysql_driver%\bin\mysqldump.exe -A -a --add-drop-database --opt --host=%ip% --user= root > %realprogdir%\%DD%_%MM%_%YYYY%_%hh%_%mm%_dump.sql The above correct task, when executed by the scheduler, will be expanded into the following command: C:\Windows\system32\cmd.exe /c C:\OpenServer\modules\database\MySQL-5.3.1\bin\mysqldump.exe -A -a --add-drop-database --opt --host=127.0.0.1 --user=root > C :\OpenServer\09_01_2013_14_25_dump.sql

Information

You should take into account the fact that tasks are completed without switching to the working folder of the program specified in the task. Some PHP scripts may not work correctly if the definition of the root folder is not implemented correctly.

Bookmarks menu

To quickly access the necessary pages on sites and work folders, to launch and execute any programs and commands in OSPanel, it is possible to create bookmarks.

Types of bookmarks

  • Link
  • Folder
  • Program (can be launched with parameters)
  • Command in Windows command line format

Using Variables as Substitutions

Variable Variable Description
%realprogdir% Real path to the OSPanel folder (backslash "\")
%progdir% Generated path to the OSPanel folder, taking into account the virtual disk (backslash "\")
%sprogdir% Generated path to the OSPanel folder, taking into account the virtual disk (slash "/")
%dprogdir% Generated path to the OSPanel folder, taking into account the virtual disk (double backslash "\\")
%dsprogdir% Generated path to the OSPanel folder, taking into account the virtual disk (double slash "//")
%realsitedir% Real path to the root domain folder (backslash "\")
%sitedir% Generated path to the root folder of domains, taking into account the virtual disk (backslash "\")
%ssitedir% Generated path to the root folder of domains, taking into account the virtual disk (slash "/")
%httpport% HTTP server port
%httpsport% HTTPS server port
%postgresqlport% PostgreSQL server port
%mysqlport% MySQL server port
%mongodbport% MongoDB server port
%memcacheport% Memcache server port
%ftpport% FTP server port
%httpdriver% HTTP module name
%phpdriver% PHP module name
%mysql_driver% MySQL/MariaDB module name
%pg_driver% PostgreSQL module name
%mongo_driver% MongoDB module name
%memcachedriver% Memchache module name
%dnsdriver% DNS module name
%ip% Server IP address
%disk% Drive letter from the generated path to the OSPanel folder, taking into account the virtual disk (letter only)
%osdisk% Drive letter from the real path to the OSPanel folder (letter only)
%sysdisk% Windows system drive (letter only)

When creating bookmarks on [launch programs with parameters], the separator between the path to the program and the launch parameters is the # sign, otherwise the bookmark will be executed through the command line!

Examples of creating a bookmark: # Example 1 (link) Name: My site Run: http://xxx.ru # Example 2 (running a program with parameters) Name: MySQL manager Run: %realprogdir%\modules\heidisql\heidisql.exe# -h=%firstsite% -u=root -P=%mysqlport%

Program menu

Adding a portable program

When using the Full version of OSPanel, it is possible to add your own portable program to the menu. To do this you need to do the following:
  1. Open the folder with the category of programs you need in the subfolder ./progs/ and create a folder in it with the name of your portable program
  2. Copy your portable program along with its folders and files to the directory you created
  3. Restart OSPanel (not the server)

Attention

The name of the folder with the program and the name of the portable program (without extension) must be identical!

Adding a program category

To add your own category to the program menu, you should create a folder of the same name in the directory ./progs/. Programs added to the Default folder are displayed immediately in the program menu, without a category.

Adding a program shortcut

In addition to portable software, you can add shortcuts to locally installed programs to the program menu. Such a pointer to the program will be displayed in the menu along with other programs and will work like a regular shortcut in the menu. To add a shortcut to a locally installed program, simply copy it to the folder ./progs/program_category you need/.

Attention! Do not try to copy non-program shortcuts to folders, sites, etc. into the menu of portable programs. Such shortcuts will not appear in the menu and therefore will not work. To create shortcuts to sites, folders, etc. use [Menu → Settings → Bookmarks] (see).

Start/stop scripts

Addition of server start and stop scripts

In OSPanel, it is possible to supplement server startup and shutdown scripts with your own .bat files (bat files).

To complete the launch script, you need to create a template file /userdata/start.tpl.bat, to supplement the stopping script, you need to create a template file accordingly /userdata/stop.tpl.bat. You can write arbitrary sequences of commands in such files for execution by the Windows command interpreter.

Before launch

Executing the file /userdata/pre_start.bat (template: /userdata/pre_start.tpl.bat) happens BEFORE launch all modules. The file must process correctly and complete, otherwise the server will wait for it to complete indefinitely.

After launch

Executing the file /userdata/start.bat (pattern: /userdata/start.tpl.bat) happens AFTER starting all modules, but before the status flag turns green. The file must process correctly and complete, otherwise the server will wait for it to complete indefinitely.

Before stopping

Executing the file /userdata/stop.bat (pattern: /userdata/stop.tpl.bat) happens BEFORE stopping modules. The file must process correctly and complete, otherwise the server will wait for it to complete indefinitely.

After stopping

Executing the file /userdata/post_stop.bat (template: /userdata/post_stop.tpl.bat) happens AFTER stopping the modules, but before the status flag turns red. The file must process correctly and complete, otherwise the server will wait for it to complete indefinitely.

Using Variables as Substitutions

In template files with the extension .tpl.bat you can use substitutions. Available options for substituting program variables:
Variable Variable Description
%realprogdir% Real path to the OSPanel folder (backslash "\")
%progdir% Generated path to the OSPanel folder, taking into account the virtual disk (backslash "\")
%sprogdir% Generated path to the OSPanel folder, taking into account the virtual disk (slash "/")
%dprogdir% Generated path to the OSPanel folder, taking into account the virtual disk (double backslash "\\")
%dsprogdir% Generated path to the OSPanel folder, taking into account the virtual disk (double slash "//")
%realsitedir% Real path to the root domain folder (backslash "\")
%sitedir% Generated path to the root folder of domains, taking into account the virtual disk (backslash "\")
%ssitedir% Generated path to the root folder of domains, taking into account the virtual disk (slash "/")
%httpport% HTTP server port
%httpsport% HTTPS server port
%postgresqlport% PostgreSQL server port
%mysqlport% MySQL server port
%mongodbport% MongoDB server port
%memcacheport% Memcache server port
%ftpport% FTP server port
%httpdriver% HTTP module name
%phpdriver% PHP module name
%mysql_driver% MySQL/MariaDB module name
%pg_driver% PostgreSQL module name
%mongo_driver% MongoDB module name
%memcachedriver% Memchache module name
%dnsdriver% DNS module name
%ip% Server IP address
%disk% Drive letter from the generated path to the OSPanel folder, taking into account the virtual disk (letter only)
%osdisk% Drive letter from the real path to the OSPanel folder (letter only)
%sysdisk% Windows system drive (letter only)

In addition to writing commands, the listed substitutions can be used to specify real environment variables, for example: setx DIR_PHP "%realprogdir%\modules\php\%phpdriver%" You need to understand that files with the extension .tpl.bat are only templates.bat files and will not be executed. During the process of starting or stopping the server, template files will be converted into executable .bat files in the same folder with replacement of substitution variables, and these ready-made .bat files will be sent for execution.

Attention

Once the Windows shutdown procedure has begun, it is not possible to launch any new processes, so STOP scripts ( stop.bat And post_stop.bat) are not fulfilled. If you require mandatory execution of shutdown scripts, you must manually shut down OSPanel immediately before you want to shut down your computer.

Limited mode

When not available for recording HOSTS file e (usually this happens when the program is launched without administrator rights), the program goes into a limited mode of operation with reduced functionality.

In limited mode, you will not have access to the following functionality:

  • Using your own aliases and domains (except for the localhost domain);
  • Specifying the server IP address (except for addresses 127.0.0.1 and *);
Thus, in limited mode, you will have access to one of two IP addresses: 127.0.0.1 or *, and only one localhost domain. Other aliases and domains you create will not be processed by the program.

Work in limited mode is only possible when complete absence administrator rights. If you have the opportunity to run the program with the necessary rights, then it is definitely recommended to take advantage of this. In case you constantly forget to run the program with the necessary rights, enable the [Require Administrator account] option.

If in the startup logs you see a message that the Hosts file is not writable and OSPanel is running with administrator rights, this means that access to this file is blocked by antiviruses/firewalls (even for trusted programs) or Windows access rights restrictions apply.

Add OSPanel, as well as all other components that the antivirus/firewall will ask about, to trusted programs. Disable HOSTS file (or system files) protection in your antivirus/firewall settings, if such protection is present. Try deleting the file C:\Windows\System32\Drivers\etc\hosts and re-create with the following content: 127.0.0.1 localhost In case of working without administrator rights, but with access to HOSTS record file, the program works in normal mode without any restrictions. You can allow writing to the HOSTS file for all users by running the following command through the console (run as Administrator): attrib -s -r -h -a C:\Windows\system32\drivers\etc\hosts

Attention

When User Account Control (UAC) is enabled and launched without administrator rights, OSPanel will not have access to the HOSTS file and will automatically switch to restricted mode.

Launch without making entries in the HOSTS file

OSPanel has the ability to fully launch without making entries in the HOSTS file. This feature will be useful to users office networks and terminals where only the senior administrator has access to the HOSTS file. If the [Do not make changes to the HOSTS file] option is enabled, then the server starts without editing HOSTS file, i.e. Access to this file is not required at all.

You should know and understand that during startup the program makes a DNS request to each domain you created, and if there is no entry for any of the domains in the HOSTS file, this will lead to the [Startup failure] error. Don't forget to contact your network administrator after each domain creation; the administrator must make the necessary entries in the HOSTS file, otherwise you will not be able to start the server.

The format for making entries in the HOSTS file is standard - ip space domain, for example: 192.168.5.10 rhino.acme.com 192.168.5.10 x.acme.com

Sending mail via SMTP

Yandex Mail

Mail.ru mail

Shown below typical settings to send mail via the SMTP server of the selected mail provider.

Gmail mail

Below are typical settings for sending mail through the SMTP server of the selected mail provider.


By default, Gmail does not allow you to use SMTP, so access must be activated separately. You need to complete the following activation steps:

1. Log in to your Gmail account
2. In the same browser tab, go to https://www.google.com/settings/security/lesssecureapps
3. Activate account access for “unverified applications” (see picture below)
4. Test sending a letter through your script on the OSPanel server
5. Refresh the page https://www.google.com/settings/security/lesssecureapps and re-activate account access for “unverified applications” (you can ignore the email you received about an attempt to access your account)

Now try sending the email again, this time it should work.

External access

Working with external networks

OSPanel can work on local networks and the Internet as a web server. To work on the Internet you need a static (white) IP address. To open access to the server from the outside, you need to specify * as the IP address in the OSPanel settings, in this case access will be opened immediately for all networks to which your computer is connected. If you want to open access only to one specific network (for example, a local network), then specify in the program settings the IP address issued to your computer on this network.

Information

When working through a router or other gateway, you may need to additional customization. See the documentation for the equipment you are using, contact your network administrator.

External access to local domains

After you set up remote access to your server, all local domains will become accessible remotely. But how to open them? To open the desired site from a remote machine, you will need to make an entry in the HOSTS file of such a computer with the address of your local domain, for example: 64.55.96.24 supersite (where 64.55.96.24 is the address of your computer, and supersite is the name of the local domain). After making such an entry in the HOSTS file on the remote computer, the supersite domain will be available by typing it into the browser as usual.

Please note that simply typing the IP address of your computer http://64.55.96.24/ or trying to access a non-existent local domain will open a blank page.

So that when you type the IP address of your computer, a specific local site opens, you can create an alias of the form your_external_ip => your_local_domain. After these steps, the local domain you specified, for which you created an alias, will become accessible via a local network or the Internet at http://your_external_ip/ (for example http://64.55.96.24/). If your computer is connected to several networks and IP=* is set in the server settings, then such an alias must be created for each IP address issued to your computer in each of the networks.

Computer security

When working with external networks, there is no guarantee of your computer's security. The server runs with Administrator rights, which means that scripts running under its control can do whatever they want on the computer. Security holes in scripts can give hackers access to your computer. We do not recommend this use of OSPanel! Before setting up remote access to the server, be sure to review the section of this reference guide.

External control

OSPanel can receive some commands over the Internet; for this there is a built-in control panel that runs on a dedicated port. The program can also be controlled via the command line.

Internet control

To access the control panel you need to type http://localhost:1515/ (default). The port, login and password for the control panel can be specified directly in the OSPanel settings [Menu → Settings → Miscellaneous]. The control panel is available on any IP address from which your computer is accessible, as well as on any local domain created on the server. To manage the program via the Internet, your external IP address must be “white”, i.e. accessible from the Internet.

Commands to use on the command line

"C:\openserver\OSPanel.exe" # start the program "C:\openserver\OSPanel.exe" /start # start the server "C:\openserver\OSPanel.exe" /restart # restart the server "C:\openserver\OSPanel .exe" /stop # stopping the server "C:\openserver\OSPanel.exe" /exit # exiting the program

Server protection

Setting up protection

When a server is open to access from the Internet, it becomes extremely vulnerable, especially with the default settings. Many spiders and viruses constantly scan the Internet for open ports and, as a rule, an unprotected server is hacked within a few hours of appearing on the network.

Several steps to protect your web server from unauthorized access:

  1. Change the default FTP user passwords [Menu → Settings → FTP server];
  2. Install own passwords for root (and other) users of all DBMS modules;
  3. Enable protection of web tools and disk from access from external networks in the program settings [Menu → Settings → Server];
  4. Now restart yourself control program(not server);
  5. Configure the firewall by blocking ALL ports from outside access except those that you plan to use (for example: 80,443,21,990,53);

Attention

The web server runs on behalf of the administrator of your computer, when working on external IP addresses or IP = * the security of your computer will be at risk! Avoid using vulnerable scripts, incorrect module configurations, and simple passwords.

Built-in protection against external access

Selecting the [Protect server from external access] option will disable some dangerous PHP functions, access to web tools from outside will be blocked, and disk access for PHP scripts will be limited to the root folder of the domains. This option reduces the performance of PHP scripts by 3-4 times.

Working with Pear and Composer

Installing Pear

To install Pear, start the server and go to [Menu → Advanced → Console], then type the command in the console go-pear and follow the installer's further commands.

Installing Composer

Composer is compatible with all PHP modules since version 5.3. To install Composer, start the server and execute [Menu → Advanced → Console], then go to the folder with the site where you plan to install Composer (for example: cd C:\openserver\domains\localhost). Once you are in the folder with the desired site, type the command in the console composer init and generate a Composer configuration file (composer.json). When the composer.json file is generated, type the command in the console composer install and wait for the installation of the selected projects, as well as their dependencies. In the future, you can update installed projects with the composer update command, for example: cd C:\openserver\domains\localhost & composer update -v

Installing Composer projects

  1. Execute [Menu → Advanced → Console];
  2. Go to the folder with the site where you plan to install the project;
  3. Install any project you need, for example:
# Go to the project folder cd C:\openserver\domains\localhost # Install Symfony composer create-project symfony/framework-standard-edition symfony # Install PHPUnit composer create-project phpunit/phpunit phpunit & echo @php -d output_buffering=0 phpunit\phpunit.php %*>phpunit.bat # Installing Laravel composer create-project laravel/laravel laravel --prefer-dist # Installing phpDocumentor composer create-project phpdocumentor/phpdocumentor phpdocumentor In the future, to update a project installed in this way, just go to the folder with the desired project and execute the command composer update: cd C:\openserver\domains\localhost\phpunit & composer update

Working in the console

To launch the built-in console, you need to start the server and execute [Menu → Advanced → Console]. The environment is formed at the moment the server starts and is passed on to all launched modules. Any other programs, be it a console or an IDE, can also get the correct environment; just launch these programs from the OSPanel menu. To do this, you can either make a bookmark or add a shortcut to the program menu (see sections and).

You need to know that if you launch the console or any other program from the standard Start menu or from a shortcut on the desktop, and not from the OSPanel menu, then they will not be able to work with the virtual environment created in OSPanel.

The built-in console can be launched even if the server is turned off; in the Full version, go to [Menu → Programs → Internet → Console]. However, when the server is turned off, the environment is not formed and therefore it will be impossible to work from the console with PHP and other modules or programs (Pear, Composer, scripts, etc.).

Important Features

If you start the console first and only then start the server, the environment will NOT be available in the console. To begin full work with modules after starting the server, you need to close and reopen the console, since only when the server is active does the console receive a correctly formed environment at the time of launch from the menu. Likewise, the environment will not be updated in the console if you switched to another PHP or MySQL module and restarted the server, but did not restart the console!

Registry fixes

Fixes are offered for self-installation from the OSPanel menu among the bookmarks created by default. You can also find fixes in the folder ./modules/system/ and apply them yourself.

Registry fix to disable IPv6

This fix allows you to disable all IPv6 components except the loopback interface. The fix also tells Windows to prefer IPv4 over IPv6 by changing entries in the prefix policy table. It is recommended to use this fix only for those users who use the localhost domain and OSPanel does not have permission to write to the file Windows\System32\Drivers\etc\hosts.

Registry fix to customize system behavior

This fix allows you to customize the behavior of the system during Windows shutdown. The fix disables automatic process termination and increases the waiting timeout (after which the process is considered hung) to 30 seconds.

Registry fix to optimize SSD performance

This fix allows you to disable Link Power Management (LPM) and DIPM in SATA AHCI drivers. Using LPM with SSD drives often leads to the possibility of “freezes” in the operation of the operating system, from small freezes to a complete system freeze. To prevent SSD wear and tear, this fix disables the Superfetch and Prefetch services, as well as time updating last access to files in NTFS.

The fix should not be applied if the system does not use SSD drives. Laptop users should use the fix wisely, since the power consumption of the drives will increase slightly, which will reduce the battery life of the laptop.

Registry fix for TCP tuning

This fix will optimize the TcpTimedWaitDelay and MaxUserPort values, allowing your system to run faster and with more TCP connections. In particular, the problem with torrents will disappear: it is impossible to perform an operation on the socket because the buffer is too small or the queue is full. Other programs that create a large number of simultaneous TCP connections will also be able to work normally.

Fix TCPIP driver for Windows XP

Half-open limit fix is ​​intended to change maximum quantity simultaneous half-open outgoing TCP connections (half-open connections or connection attempts) in system file tcpip.sys. The limitation is that a computer is not allowed to have more than 10 simultaneous half-open outgoing connections. Thus, the connection speed to other computers is actually limited. The patch allows you to remove this limitation, that is, increase maximum limit half-open connections. For the vast majority of users, a limit of 100 will be sufficient. The patch is applicable for outdated versions Windows x32 and x64: XP, 2003 Server, Vista. Starting from versions of Windows Vista SP2 and Windows 7, there is no need to apply the patch and if it starts, it will inform you that installation is impossible.

Attention

After applying the fixes, you should be sure to restart your computer.

Questions and answers

Nothing starts?

Don’t despair, look at the general program log and other component logs [Menu → View logs]. In the vast majority of cases, you will find the reason for the unsuccessful start there. In more complex cases, enable the [Run server in debug mode] option; this will allow you to see debugging information at startup. Also add OSPanel to trusted programs your firewall or antivirus, if you have one.

It says port 80, 3306, etc. already taken!

Enable the [Start server in aggressive mode] option in the OSPanel settings; in this mode, all programs occupying the required ports will be forcibly closed. Add OSPanel to trusted programs your antivirus/firewall/proxy server or disable monitoring of ports 80/443/21/90xx/3306 if available. Individual antiviruses/firewalls may have their own additional ones. settings related to intercepting program connections to the network.

It says that there are no access rights to work in this folder!

You are trying to run OSPanel from a folder that belongs to another user, or OSPanel files were written to the computer by another user. If OSPanel will be launched by the user Pavel (for example), then log in under the Pavel account and copy OSPanel to a folder that belongs to the user Pavel (has write rights), after which it will be possible to start the server for this user. Instead of copying, you can set special access rights to the folder with OSPanel, contact your computer administrator.

Why are the buttons gray and not pressable?!

At any given time, only those buttons and menu sections are active that can perform the action assigned to them. For example: if the server is not running, the PHPMyAdmin menu item will be inactive; if the server is running, the buttons for clearing logs will be unavailable, etc.

I can't open the menu when the flag is yellow!

A yellow flag indicates that a command is executing (for example, starting, stopping, or saving settings). While commands are being executed, the program menu is not available.

I created 3000 domains and now the server won’t start!

Increase the number of server status checks to 20-30 or higher in the program settings [Menu → Settings → Miscellaneous]. Switch to using the Apache HTTP module if you are using the Nginx module.

I want to test the site taking into account different Internet speeds (mobile devices for example)!

OSPanel has the ability to limit the data transfer rate for simulation slow loading site. To limit the speed, use the OSPanel menu: [Menu → Settings → Miscellaneous]. The speed can be limited between 1-40 KB per second, setting the value to 0 or more than 40 cancels the limit. A speed limit is set for each request, so if a client simultaneously opens 4 images on the site (4 connections), then each of them will be loaded at a given speed.

Where can I edit module settings?

To edit module settings, use the OSPanel menu: [Menu → Advanced → Configuration].

Where are my emails saved?

By default, all emails are saved to a temporary folder userdata/tmp/email/, when the server is stopped, this folder is not cleared. You can configure sending emails via a remote SMTP server: [Menu → Settings → Mail].

I click on the desired site in the program menu, but nothing opens!

For many menu items to work, you must have a correctly installed and working default browser. You can also directly specify your browser in the program settings: [Menu → Settings → Menu].

I created a local_site.loc domain, but it doesn't work!

An underscore cannot be in a domain name, so the domain will not connect. Allowed characters: .

The server does not start with ip 192.168.0.1 and says that localhost only works on ip 127.0.0.1!

Indeed, the localhost domain can only be used with an IP address of 127.0.0.1, so either rename this domain or delete it if you do not need it.

I want to work without a virtual disk!

Select in the OSPanel settings to work without a virtual disk and copy the server folder to a directory the path to which contains only Latin characters or numbers, otherwise work without virtual. disk will not be possible.

I don't see the virtual disk!

If you are not running under an administrator account, but OSPanel is running with administrator rights, then the virtual disk (if used) will not be available to you. OSPanel will work fine in this case. You can disable the use of a virtual disk in the settings, but take into account the requirements for absolute path described in the previous answer.

The server starts, but the browser says that the domain was not found!

If your browser is configured to work through a proxy server, then local sites will not be available to it. To remedy the situation, stop using proxies in your browser or add local domains and the server's IP address to the list of proxy exceptions in your browser settings. In some cases, you need to recreate the HOSTS file (see).

Why do you need to configure the display of bookmarks instead of sites?

In this mode, the created bookmarks are displayed instead of a list of domains; this will be useful when creating demo assemblies with installed scripts (see).

I have a hard time re-creating bookmarks, FTP users etc, I just need to edit them!

There is no need to re-create records again, just double-click on the record you are interested in in the table, after which this record will immediately be removed from the list and placed back in the edit fields. Don't forget to add the edited entry back to the table!

Connecting to the database takes more than 1 second!

Disable the use of the IPv6 protocol using the instructions from the section of this manual.

I copied my script to the domain folder, after restarting the server does not see the files and shows an error!

Most likely you copied or created such a subfolder in a folder with a domain whose name matches the conditions automatic search domain root folder (see).

The server gradually took up all the disk space!

The gradual disappearance of free space indicates that you have disabled auto-cleaning of logs when starting the server. As a result, when the server is actively used, log files grow to enormous sizes and occupy everything free place on disk. Clear log entries in the log viewing window and enable auto-clearing of logs at startup in the OSPanel settings. Empty folder .\userdata\tmp from temporary files.

How do I create my own host configuration for a domain?

Use the virtual host configuration template in the folder with the required domain to create a specific domain configuration. When creating/changing a file, a server restart is required. The configuration template for the required module can be found in the folder ./userdata/config/.

For example, if you want to create your own xxx.ru domain configuration for the Apache-2.4.2 module, then copy the file ./userdata/config/Apache-2.4.3_vhost.conf to the folder with the desired domain, edit this file to suit your needs and restart the server.

Or another example, when using the Apache+Nginx module, you can copy both configuration files for each server to the domain folder: Apache-2.2.23+Nginx-1.2.4_vhosta.conf And Apache-2.2.23+Nginx-1.2.4_vhostn.conf.

Please note - when editing the host configuration, you cannot delete or replace system variables %...%, you can only make new entries that supplement the configuration.

How and where are component configs edited?

OSPanel uses configuration template files that are available through the general program menu. Do not try to edit temporary config files that are created when the server starts, it makes no sense. Configuration templates are individual for each module, i.e. If you select any of the modules as active, the settings templates for that particular module will be activated. For example: you configured a php.ini file template with the PHP 5.2 module active, and then selected the PHP 5.3 module as the active one. In this case, you need to configure the php.ini file template again for the PHP 5.3 module.

The settings templates themselves for all modules and tools are stored in the folder ./userdata/config/, they cannot be used as real configs and cannot be specified when launching modules, consoles and scripts. During the launch process, configuration templates pass through a parser, which replaces all substitution variables with real data and saves the ready files configurations to folder ./userdata/temp/config/.

How to specify special settings for connecting to an SMTP server for a selected domain?

In OSPanel, it is possible to send mail through a third-party SMTP server, while all domains use the connection parameters that were specified by the user in the OSPanel settings window. In order for a specific domain to use its own connection settings to the SMTP server, you need to specify them in the configuration template for this host. Open the virtual host configuration template (how to create it is described in the previous answer) in the folder with the desired domain and add the following content (in one line) to the host description: php_admin_value sendmail_path "%mailway% -t --smtp-ssl=none --smtp- server=smtp.xxx.xx --smtp-port=xx [email protected] [email protected]--smtp-pass=xxxxxx --pop3-server=pop3.xxx.xx [email protected]--pop3-pass=xxxxxx" For example: %limit% DocumentRoot "%hostdir%" ... php_admin_value sendmail_path "%mailway% -t --smtp-ssl=none --smtp-server=smtp.xxx.xx --smtp-port=xx [email protected] [email protected]--smtp-pass=xxxxxx --pop3-server=pop3.xxx.xx [email protected]--pop3-pass=xxxxxx" ... Last part of the line --pop3-server=pop3.xxx.xx [email protected]--pop3-pass=xxxxxx add only if POP3 authorization is required before SMTP. Possible values ​​for the --smtp-ssl= parameter are none, auto, ssl or tls.

It must be remembered that when specifying own settings connecting to an SMTP server, sending mail for the selected domain will work regardless of the main OSPanel settings. Please also note that all data SMTP servers including login and password will be available in PHP scripts and visible in the phpinfo() information, therefore, for security reasons, it is not recommended to use the described option of specifying mail sending settings in the host config.

Problem solving

Below is the procedure necessary to solve problems with starting the server. After completing each action, you must repeat a test run of the server, and if the launch fails, you can proceed to the next step.
  1. Execute [Menu → Advanced → First run]. If you wish, you can agree to include fixes in the registry.
  2. Make sure that the IP address specified in the settings exists (except for [*]). Also make sure that all other program settings are correct.
  3. Add OSPanel to trusted programs your firewall/antivirus or configure them properly, if any.
  4. Run [Menu → View logs], try to find the cause of the problem and fix it (if possible).
  5. Enable the [Run server in debug mode] option in the OSPanel settings and try to find the cause of the problem and fix it (if possible).
  6. Run the following command through the console (run as Administrator): attrib -s -r -h -a C:\Windows\system32\drivers\etc\hosts
  7. Activate DNS service if it is disabled and start it, disable all services that have IIS in their name.
  8. Disable global proxies and proxies if they are installed on your computer.

Information

A very common problem is that port 80 is busy, it is usually occupied Skype program. To fix the problem, go to [Skype Settings → Advanced → Connection] and uncheck the [Use ports 80 and 443 as alternative] checkbox.

User Account Control (UAC)

When User Account Control (UAC) is enabled and launched without administrator rights, OSPanel will not have access to the HOSTS file and will automatically switch to restricted mode. As a rule, limited mode is signaled by the presence of only one localhost domain in the program menu, while other domains were previously created. To correct the situation, enable the [Require Administrator account] option in OSPanel settings and restart the program, or disable User Account Control (UAC).

If you don't have the opportunity disabling UAC or running the program with administrator rights, there are several options for solving this problem:

  1. Using the built-in DNS server (configuration according to the Guide);
  2. Activating the option [Do not make changes to the HOSTS file] + manual editing this file;
  3. Set write permissions to the HOSTS file for everyone Windows users;
  4. Refusal of the ability to manage domains and work with a single localhost domain;

Creating assemblies

What is it and why is it needed?

For example: you have your own website, script or your own CMS, which you need to present to future clients for review, show to the customer, or simply make a demo package for your software product. It is necessary that your software product works equally well for everyone, in the same configuration, and is already installed and ready for use or evaluation. OSPanel will help you with this!

You can create a ready-made mini-server with installed script, CMS system, website, project, etc., and future users or clients will only have to download and run it! Your product will be operational from the very beginning, you will not need to look for a server for it, you will not need to install, configure, etc. Moreover, demo materials can be distributed to clients on a CD/DVD. OSPanel can be launched from such media as from a regular HDD disk or flash drive, with the only difference being that when working from an optical disk, no changes or files will be saved after exiting the program.

How to create a demo build

  1. Download OSPanel Mini distribution latest version and unpack it into a temporary folder. Go to the folder where the distribution was unpacked and run the program OSPanel.exe.
  2. Remove unnecessary modules in the folder ./modules/php/*, ./modules/database/* And ./modules/http/* leaving only one module in the folders that will be used for your software product. If you do not plan to use the DNS and Memcached modules, then the folders with these modules can also be deleted: ./modules/dns/* And ./modules/memcached/* respectively.
  3. Click [Menu → Settings] and select to use those modules that you have not removed. Set the server IP address to 127.0.0.1 , disable [Automatic check for updates], do not disable the option [Automatically detect the need for virtual disk]. Set all other settings you need.
  4. Click [Menu → Advanced → Configuration] and configure configuration templates for the required modules for your product (script/website/cms), if necessary.
  5. Start the server and install your software product (script/website/cms) on the domain localhost, which is present in OSPanel by default. Execute necessary actions after setting up the script, then exit all authorization forms where you are logged in (for example: personal account, administration, etc.).
  6. Click [Menu → Settings] and create bookmarks for the main pages of your software product (for example: Admin panel, Personal account, Home page). Enable the [Show bookmarks instead of websites] option in OSPanel settings. Now stop the server and save the settings.
  7. Click [Menu → Exit] and rename the program file according to your product name, for example ./temp folder/OSPanel.exe V ./temporary folder/MegaCMS Server.exe.
  8. Now you can add documentation for your product to the assembly in the form of a .chm file. The file must be copied to a folder ./modules/system/docs/, it will later be displayed in the [Advanced → Documentation] menu.
  9. Now pack the contents of the temporary folder into a self-extracting archive or burn its contents to a CD/DVD disc. The choice depends only on the intended form of distribution of the assembly.
A personal demo build for your software product is ready!

Using the method described above, you can prepare not only demo builds, but also dev packages for developers, website presentations, portal archives, interactive materials on CD, etc.

In this lesson we will figure out how to install Open Server on your computer. But first, let’s find out what Open Server is and what is it for?

Open Server is a portable server platform and software environment created specifically for web developers, taking into account their recommendations and wishes.

The software package has a rich set of server software, a convenient, multifunctional, well-thought-out interface, powerful features on administration and configuration of components. The platform is widely used for the purpose of developing, debugging and testing web projects, as well as for providing web services on local networks.

In other words, Open Server will allow you to create websites right on your local computer. Also, you will be able to work with the current site by first uploading it to Open Server, rather than experimenting with the existing site directly on the hosting. This can be useful when you want to check a new engine update, try out a new module on the site, change the design, etc. Open Server will help you with all this.

You can read more complete information about Open Server on the official website.

I’ll also add that I used to use it to develop websites, but since it hasn’t been updated for a long time, and there’s no way to independently make the necessary settings on the local server, I turned my attention to the alternative - Open Server, and I’ve never regretted it choice.

Well, let's start installing Open Server.

First of all, we need to download the distribution itself. To do this, go to the official website in the “Download” section, select the desired distribution version (1). It is worth noting that the product comes in three versions: Ultimate, Premium, Basic, how they differ from each other can be clearly seen in the comparison table on the website. I always use "ULTIMATE" (maximum performance). Next, enter the code from the image (2) and click the “Download” button (3).

As soon as the distribution is downloaded, we begin the installation.

The distribution is presented in the form of a self-extracting archive. We launch it and we are immediately prompted to select the disk where Open Server will be unpacked. I leave the “C” drive by default; if you want to install on another drive (or on a flash drive or portable drive), then specify the appropriate path for unpacking. After the disk is selected, we begin unpacking and click the “Ok” button.

We are waiting for the distribution to be unpacked.

Now we can run the program. Since the program is portable, no shortcuts are created on the desktop or in the Start menu. Therefore, go to the drive where Open Server was unpacked (for me it’s C:\OpenServer\) and you will see two exe files for launching Open Server: for 32 (Open Server x86.exe) and 64 (Open Server x64.exe) bit system Windows. According to your operating room Windows system you can display one of the shortcuts on your desktop to always have quick access to launch Open Server.

When you first launch you will be asked to select a language.

Also, when you first start the Open Server, you will be prompted to install patches for Microsoft Visual C++. Click “Ok”.

We are waiting until the installation of the necessary libraries is completed.

And the last thing we can do is restart the computer for all the changes to take effect. Click “Ok”.

As soon as the computer restarts, you can start working with the local server.

Starting and checking the operation of Open Server

Launch Open Server and you will see that a red flag icon has appeared in the tray. This means that the program is activated, but the server itself has not yet started.

To start the server, click on the icon with any mouse button and in the context menu that opens, select “Run”. As soon as the local server starts, the checkbox will turn green.

Now the Open Server is running and ready to work.

To check its functionality, go to your browser and enter: http://localhost/ in the address bar. If you see the message: “Welcome to Open Server!”, then you have done everything correctly and the local server is ready to work.

This completes the installation of Open Server! Congratulations, you have successfully completed your task :)

In one of the next lessons I will talk about setting up Open Server, so don't miss it.







2024 gtavrl.ru.