• How to create a local server on a computer? How to create a local server on a computer in the denwer program

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

    1. 1. , and whether you need your own server at all. 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, for this you will have to pay extra to the provider and enter into an additional contract for the provision of such services.

    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 rating 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, let's focus on the installation operating system"Ubuntu Server".

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

    1. Download and copy the operating system image onto a 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 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. At this point, the installation of the server operating system and the initial creation of the server are completed.

    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”.

    Greetings to all readers of the blog site. This article will focus on the local Open Server.
    What is a local server and what is it for? Local server is special program, which gives us the opportunity to work on our Internet project directly on our home computer.

    Test your site, try out different features on it, bring it to mind, while being able to observe how the project will look in browsers after publication on the Internet. And only after we bring our brainchild to fruition, do we let it float freely.
    A local server is one of the tools that should always be at hand, even after everything on the site we created has been checked, working, and published.

    Improvement appearance developing a website and its functionality is a fascinating and lengthy process, and for many, eternal. And performing any experiments in this direction directly on the working site is not good.
    This means that the process of any innovations must be tested and tested on a local server. And after that, we upload the changed files to our working website via an FTP client.
    The most popular local server among WEB developers is Denver. I work with him, my beloved, all the time. There are other local servers besides Denver, but I'm not familiar with them yet.
    Why am I writing specifically about the Open Server portable server system, and not about Denver. Yes because in lately Open Server is becoming more and more popular. More and more often we come across positive reviews and comments about how convenient and cool it is. And I can't get past this. Therefore, today I am installing the Open Server software environment on my computer, at the same time, telling step by step how to do this in this article.

    Open Server which version should I choose?

    All versions of the local server are portable and do not require installation. This means that Open Server can be downloaded to a USB flash drive or portable hard disk, and use it anywhere, on any computer.
    Three distributions of the program are offered for download.
    The "maximum" edition is the full version of Open Server. In addition to the local server, it includes a decent set of portable software for webmasters.


    “Extended” edition is a version of the program without additional software. Recommended for those who do not intend to use additional software offered in the “Maximum” version in their work and want to save disk space.
    The “basic” edition is the smallest version of the local server. In addition to the lack of software presented in the “maximum” version, the ImageMagick, PhpPgAdmin, PostgreSQL, Rockmongo, MongoDB and Git modules available in the “advanced” edition are also missing.
    This version is recommended for users with slow Internet and those who want to save disk space as much as possible.
    Which version should I download? If you are asking this question, then download “Basic”. Other versions are intended for advanced web developers.

    Installing Open Server - "basic" edition.

    If the situation is correct, on the page that opens we see the following:

    Configuring local server settings, installing WordPress

    Let's go through the settings. Open the menu, go to the “Settings” item, select the “Basic” tab:

    In addition to the items marked by default, I noted two more. Running alongside Windows so as not to create extra shortcut on the desktop.

    And the requirement to run the program with administrator rights. Recommendation directly from the developer of the portable local server.

    In the “Menu” tab I did the following:

    I checked the “Show sites in the main menu” checkbox so that the domains I added would be displayed in the Open Server menu.

    And I chose a browser, specifying the path to the executable file to open web pages.

    I left the rest of the local server settings at default.

    Let's start installing WordPress on a local server.

    Go to settings Open Server Well, select the “Domains” tab, enter the name of your domain (I registered the site for myself), click on the ellipsis:

    In the new window that opens, create a folder of the same name for the domain:

    Click OK, save, and restart the server. If everything is done correctly, our folder will appear in the Open Server menu:

    The folder has been created, all that remains is to drop the unpacked WordPress distribution files into it (download the latest WordPress distribution from here).

    We do this by simply copying files and directories from folder to folder, or with using Total Commander.

    From the unpacked archive we copy only what is inside the wordpress folder into the folder we created.

    Our folder is located in the domains directory:

    Almost everything is ready, but in order for everything to work, all that remains is to create a database for WordPress.

    In the Open Server menu, on the “Advanced” tab, click on “PhpMyAdmin”.

    In the window that opens, select the Russian language.

    We enter the user - mysql.

    Enter the password - mysql.

    In the next window that opens, select the “Users” tab and click on the “Add user” link:

    Select the host - localhost.

    Coming up with a password

    (We save the username and password in a secluded place, they will be useful to us later.)

    Check the checkbox as shown in the picture.

    Click OK in the lower right corner of the open window.

    Close PhpMyAdmin - the database has been created.

    All that's left is to rename the wp-config-sample.php file and make some changes to it.

    We find this file in the following path: openserver/domains/your folder (in my case, the site)

    Rename the file wp-config-sample.php to wp-config.php Open the file for editing (with Notepad++ editor), and enter the name of the database we created, username and password in the fields indicated in the screenshot:

    Save the changes and close the edited file. We go to the Open Server menu, find our folder, click on it, and see the following:

    Why won't Open Server start?

    One of the reasons that the local Open Server does not start may be the running Skype program.

    In order for the local server to work, exit Skype and launch Open Server, and after that Skype.

    Problems with the operation of the local server may be due to the antivirus installed on the computer. If the server starts when the antivirus is disabled, then you need to deal with your antivirus program. Add Open files Server to the exceptions of the antivirus installed on the computer, and everything will work.

    I have AVG and firewall COMODO the Open Server was not cursed by default.

    Local server - is one of the main tools of any webmaster.
    To create html page, you can use a simple editor, for example standard notepad Windows. To test and debug html sites, you can use any browser, for example the Windows browser, Internet Explorer. That's it.

    But! We will be faced with a completely different situation if we make a website that runs under the control of a dynamic script in PHP. Or, if you and I, we decide to create a website that runs under the control of a content (website) management system - CMS.
    How to get out of this situation? The answer is obvious; you need to install a local web server on your computer.
    Local server, installed on a computer, works exactly the same as a web server that runs on the hosting side.

    Using local server, you will be able to install and test any PHP scripts, create MySQL users and create databases, as well as manage users and databases through the admin panel
    phpMyAdmin.

    Installing a local server based on the kit denwer, is very simple and usually does not cause problems.

    Local server download- it is for this request that you will most likely find a link leading to the site of a quality software developer - denwer.ru.

    In addition, on this site, you can get acquainted with the contents of the local server distribution and learn about the local server from the first person, that is, from the developer.

    Local server download from the developer’s website - “free local server Denver”.

    Installing a local server Denver- to your computer. The local server on the computer plays the same role as the remote web server on the hosting.

    For the computer, you need to run executable file downloaded installer. The installation is simple and does not cause any problems. For the options requested during installation, select those recommended by the installer.

    After installing local server Denver, the following changes should occur on your computer:

    1. The C:\WebServers folder will be created.

    2. After rebooting the operating room Windows systems, you will have the virtual disk Z necessary for the local server to operate.

    3. On your desktop, you will have three shortcuts:

    StartDenwer - to launch the local server into operation

    RestartDenwer - to restart the local server

    StopDenwer - to stop the local server.

    I recently installed Denver on Windows 7, all local server services on Denver started, the Denver page opened, databases were created MySQL data. Next, I installed CMS WordPress on the local server.

    Despite the fact that the WordPress installation went well, the created site did not open in my browser. What I didn’t do - Denver works, but the site doesn’t open!

    Due to this, I decided to find an alternative to the local Denver server. After searching for information about local server packages, my choice fell on local XAMPP server.

    XAMPP is local server, which can be installed on any operating system, the first letter of the name indicates exactly this:

    X - cross-platform local server

    After installing the Windows 7 operating system on my computer, I started thinking - which local server should I install?

    I decided to try installing something new on my computer, some other local server. After some searching on the Internet, I settled on a local server - Open Server.

    The first thing I liked was that Open Server does not need to be installed. That is, you simply download the self-extracting archive of the local server package. Then, unpack the contents of the archive into some folder on your computer. And then, in order to launch the local server program, all you have to do is click the start file.

    Another positive point is that the local Open Server server can be started with external media. That is, from a flash card, or from CDs and DVDs.

    I should immediately note that the local Open Server server has two assemblies, full and minimal. The minimal build allows you to run only a local server on your computer.

    In , we downloaded the archive of the OpenServer software package, on the basis of which you can run a local server on your computer. In addition to the local server, the package contains many programs that are necessary for and can be useful to any web master.
    We noted one of the most important advantages of the OpenServer software package, which is that the OpenServer package works without installation on a computer. That is, to launch the local server and all programs of the complex, just click one file.
    By the way, I would like to note here a rather important point regarding the launch of the OpenServer software package.
    If your computer is running the Windows 7 operating system, run the local server as an administrator, otherwise the local server may give an error when starting.

    Well, let's continue working with the local server, and in this article, let's look at how to add to the local server new domain, or in other words, how to add a new site to a local server.
    First of all, I draw your attention to the directories that the OpenServer package contains.
    Among these directories is the domains folder. It is in this folder that the local server domain subfolders are located.
    There are two methods for creating new domains (sites) on local OpenServer server: automatic and manual.

    After this, a red flag will appear in the computer’s taskbar tray, clicking on which will give us access to the complex management menu.

    First, let's open the documentation of the Open Server software package. In order to do this, you need to click on the flag, then sequentially go through the menu items - Advanced - Documentation - Open Server.

    As a result, a window will open with background information. On the left side of the help we find a menu, here we select the item we are interested in - Domains and Alices.


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

    If we talk in simple language, then 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 the distribution executable file and select the path to unpack the files.

    System Requirements

    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]. Availability set set Microsoft Visual C++ 2005-2008-2010 Redistributable Package x86 libraries are a mandatory system requirement; OSPanel will not work without them.

    Run from CD/DVD

    OSPanel can be launched from CD/DVD disks just like from a regular one HDD drive or flash drive with the only difference that when working with 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 normal startup and use of the server on such media. 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. When a new version of OSPanel is released, you need to re-do all the settings, copy your site 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 of the 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 existing web projects have difficulties with constantly editing 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: auto search, manual control and manual + auto search. The default is the first mode automatic connection 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, however, be careful, the folder with the domain must be called by its 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 name root user no 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 for root login no 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 to the MySQL server can take a very long time (more than 1 second) and the speed of execution of PHP 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 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%
    %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 settings General server configuration is available, as well as domain configuration.

    To use the built-in DNS server, you need to configure network interface on each computer BEFORE starting the server itself. You must complete the setup both on the 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. Such configuration 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

    To serve real domains on the Internet with a local DNS server, make the following entry in the DNS settings of each domain (the domain.ru and ip parameters 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 registrar company domain # For DNS based on ns1.domain.ru registrar servers. 3600 IN A ip # For DNS based on the OSPanelns1.domain.ru server → ip

    Job 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). For URL request in the scheduler you need to use the Wget auxiliary 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 domains root 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)

    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, you can use any of the following as scheduler variables. environment variables environment variables, for example %COMSPEC%.

    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 a 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 the correct version of the job entry: %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 job, 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

    For quick access to the right 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 domains root 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 portable program menu. 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 TO 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 TO 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 modules stop, 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 domains root 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

    After starting the shutdown procedure Windows startup any new processes are not possible, 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 The following functionality will not be available to you:

    • 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.

    You can work in limited mode only if you do not have administrator rights at all. 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 are in effect.

    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 If you work without administrator rights, but with a writable HOSTS 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 for users of 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 the 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. Do not forget to contact your network administrator after each domain creation, the administrator must enter necessary records to 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

    Below are typical settings for sending mail through 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 give access to only one specific network(for example, local), 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 read 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 standard passwords FTP user [Menu → Settings → FTP server];
    2. Set your 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 the control program itself (not the 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! Do not allow the use of vulnerable scripts, incorrect module configurations, or simple passwords.

    Built-in protection against external access

    Selecting the [Protect server from external access] option will disable some of the 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 right project and run 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 standard menu Start 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 to 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 updating the time of 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 ​​so your system can run faster and with a large number 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 ​​designed to change the maximum number of simultaneous half-open outgoing TCP connections (half-open connections or connection attempts) in the tcpip.sys system file. 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 the maximum limit of 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 to simulate slow site loading. 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 absolute path requirements 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 for automatically searching for the 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 active use server log files grow to enormous sizes and take up all the free space on the 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 desired domain folder to create a domain-specific 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 startup process, configuration templates pass through a parser, which replaces all substitution variables with real data and saves ready-made configuration files to a 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.

    Please remember that when you specify your own settings for connecting to an SMTP server, sending mail for the selected domain will work regardless of the main OSPanel settings. Please also note that all SMTP server data including login and password will be available in php scripts and are 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 trial run 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 by the 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 do not have the ability to disable UAC or run the program with administrator rights, then there are several options to solve this problem:

    1. Using the built-in DNS server (configuration according to the Guide);
    2. Activating the [Do not make changes to the HOSTS file] option + manually 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 work or evaluation. OSPanel will help you with this!

    You can create a ready-made mini-server with an 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 the latest OSPanel Mini distribution 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 updates], do not disable the [Automatically detect the need for a virtual disk] option. 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. Complete the necessary steps to configure the script and 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.

    Local server– a web developer tool for creating, debugging and testing various scripts and web applications. In other words, a local web server is an emulator of a real server from a 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?

    I for a long time I used the Denver gentleman's kit, which includes php, MySql and PhpMyAdmin databases. 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 latest versions the developer included in its distribution a large number necessary programs necessary for a webmaster: browsers, code editor, file manager and more

    Open Server is distributed absolutely free of charge. The only thing you can do is thank the author for such a super useful product for webmasters by transferring an arbitrary amount to e-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 your hard drive. Who doesn’t have problems with this + needs additional modules and programs, then 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 might 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 hard drive computer, but generally preferably to the root 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 for the first time.

    To be honest, I don’t even know why this needs to be installed, previous versions Open Server did not have this. But I installed it and advise you.

    You can launch Open Server by double-clicking the shortcut we sent to your 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 view the installed modules for the local server and, if desired, you can change them. For example, the default php version is 5.5. 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. 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!